Update an existing item including invoking the callback. Must only be
invoked inside a write-lock.

@param aItem
The item to be updated. May not be <code>null</code>.
@throws IllegalArgumentException
If no item with the same ID is already contained
177756
@MustBeLocked (ELockType.WRITE)
  protected final void internalUpdateItem (@Nonnull final IMPLTYPE aItem)
  {
    internalUpdateItem (aItem, true);
  }
359832
@Override
    public java.util.concurrent.Future<PutItemResult> putItemAsync(String tableName, java.util.Map<String, AttributeValue> item) {

        return putItemAsync(new PutItemRequest().withTableName(tableName).withItem(item));
    }
87390
public final void commitUpdate(PersistentTransaction transaction) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "commitUpdate", transaction);

        AbstractItem item = null;
        boolean linkHasBecomeReleasable = false;
        synchronized (this)
        {
            if (ItemLinkState.STATE_UPDATING_DATA == _itemLinkState)
            {
                _assertCorrectTransaction(transaction);
                item = _getAndAssertItem();

                ListStatistics stats = getParentStatistics();
                synchronized (stats)
                {
                    stats.decrementUpdating();
                    stats.incrementAvailable();
                }

                linkHasBecomeReleasable = _declareDiscardable();
                _itemLinkState = ItemLinkState.STATE_AVAILABLE;
            }
            else
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    SibTr.exit(this, tc, "commitUpdate");
                throw new StateException(_itemLinkState.toString());
            }
            _transactionId = null;
        }
        // this stuff has to be done outside the synchronized block
        if (linkHasBecomeReleasable)
        {
            _declareReleasable(item);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "commitUpdate");
    }
549162
public void setItem(java.util.Collection<ApplicationResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<ApplicationResponse>(item);
    }
100934
public void updateAttributes(String targetId, Map<String, String> attributes)
            throws IOException {
        startChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        writer.startElement("attributes", null);
        writer.writeAttribute("id", targetId, null);
        for (Map.Entry<String, String> entry : attributes.entrySet()) {
            writer.startElement("attribute", null);
            writer.writeAttribute("name", entry.getKey(), null);
            writer.writeAttribute("value", entry.getValue(), null);
            writer.endElement("attribute");
        }
        writer.endElement("attributes");
    }
437208
public void update(final T dataItem) {
    if (dataItem == null) { return; }
    if (gadget_ == null) {
      gadget_ = ItemsSketch.getInstance(maxK_, comparator_);
    }
    gadget_.update(dataItem);
  }
762383
public void updateItem(long identifier) {
        if (mDrawer != null && mAdapter != null && mItemAdapter.getAdapterItems() != null && identifier != -1) {
            IDrawerItem drawerItem = DrawerUtils.getDrawerItem(getDrawerItems(), identifier);
            for (int i = 0; i < mItemAdapter.getAdapterItems().size(); i++) {
                if (mItemAdapter.getAdapterItems().get(i).getIdentifier() == drawerItem.getIdentifier()) {
                    IDrawerItem miniDrawerItem = generateMiniDrawerItem(drawerItem);
                    if (miniDrawerItem != null) {
                        mItemAdapter.set(i, miniDrawerItem);
                    }
                }
            }
        }
    }
1281671
@Override
    public void update(IEntityLock lock, java.util.Date newExpiration, Integer newLockType)
            throws LockingException {
        if (find(lock) == null) {
            throw new LockingException("Problem updating " + lock + " : not found in store.");
        }
        primAdd(lock, newExpiration);
    }
1046845
public void add(Item item, TransactionCommon transaction)
                    throws MessageStoreException, SIResourceException {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "add", new Object[] { item, transaction });

        Transaction msTran = resolveAndEnlistMsgStoreTransaction(transaction);
        _persistentStore.addItem(item, msTran);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "add");
    }
1041153
private void updateSingeItemIterator(SelectItem item) {

        if (singleItemIterator == null) {
            singleItemIterator = new SingleElementIterator();
        }
        singleItemIterator.updateItem(item);

    }
803950
protected function updateLineItems(int $iInvoiceId, array $aItems): void
    {
        $oItemModel  = Factory::model('InvoiceItem', 'nails/module-invoice');
        $aTouchedIds = [];

        //  Update/insert all known items
        foreach ($aItems as $aItem) {

            $aData = [
                'label'         => getFromArray('label', $aItem, null),
                'body'          => getFromArray('body', $aItem, null),
                'order'         => getFromArray('order', $aItem, 0),
                'currency'      => getFromArray('currency', $aItem, null),
                'unit'          => getFromArray('unit', $aItem, null),
                'tax_id'        => getFromArray('tax_id', $aItem, null),
                'quantity'      => getFromArray('quantity', $aItem, 1),
                'unit_cost'     => getFromArray('unit_cost', $aItem, 0),
                'sub_total'     => getFromArray('sub_total', $aItem, 0),
                'tax_total'     => getFromArray('tax_total', $aItem, 0),
                'grand_total'   => getFromArray('grand_total', $aItem, 0),
                'callback_data' => getFromArray('callback_data', $aItem, null),
            ];

            //  Ensure callback data is encoded as JSON
            if (array_key_exists('callback_data', $aData)) {
                $aData['callback_data'] = json_encode($aData['callback_data']);
            }

            if (!empty($aItem['id'])) {

                //  Update
                if (!$oItemModel->update($aItem['id'], $aData)) {
                    throw new InvoiceException('Failed to update invoice item.', 1);
                } else {
                    $aTouchedIds[] = $aItem['id'];
                }

            } else {

                //  Insert
                $aData['invoice_id'] = $iInvoiceId;
                $iItemId             = $oItemModel->create($aData);

                if (!$iItemId) {
                    throw new InvoiceException('Failed to create invoice item.', 1);
                } else {
                    $aTouchedIds[] = $iItemId;
                }
            }
        }

        //  Delete those we no longer require
        if (!empty($aTouchedIds)) {

            $oDb = Factory::service('Database');
            $oDb->where_not_in('id', $aTouchedIds);
            $oDb->where('invoice_id', $iInvoiceId);
            if (!$oDb->delete($oItemModel->getTableName())) {
                throw new InvoiceException('Failed to delete old invoice items.', 1);
            }
        }
    }
18028
void updateItems(List<String> updatedItems) {

        Set<CmsUUID> ids = new HashSet<CmsUUID>();
        for (String id : updatedItems) {
            ids.add(new CmsUUID(id));
        }
        m_resultTable.update(ids, false);
    }
707890
private void updateAll(CmsClientSitemapEntry entry) {

        CmsSitemapTreeItem item = getTreeItem(entry.getId());
        if (item != null) {
            item.updateEntry(entry);
            item.updateSitePath(entry.getSitePath());
            for (CmsClientSitemapEntry child : entry.getSubEntries()) {
                updateAll(child);
            }
        }
    }
569074
public void setItem(java.util.Collection<EndpointBatchItem> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<EndpointBatchItem>(item);
    }
1118573
public void put(T item, String itemId) throws Exception
    {
        put(item, itemId, 0, null);
    }
1339363
public void insertAdapterItem(TwinTextItem item, int index) {
        int selection = getSelectedItemPosition();
        Object selectedItem = getSelectedItem();
        ((PickerSpinnerAdapter) getAdapter()).insert(item, index);
        // select the new item if there was an equal temporary item selected
        if(selectedItem.equals(item))
            setSelectionQuietly(index);
        // otherwise keep track when inserting above the selection
        else if(index <= selection)
            setSelectionQuietly(selection+1);
    }
136321
public void addActionComponent( JComponent item )
  {
    if( !SwingUtilities.isEventDispatchThread() )
    {
      throw new RuntimeException( "Whoops!  UpdateNotifier is restricted to the EventDispatch thread." );
    }
    _mapItems.put( item, null );
  }