String sLockingAttributeName = (lockingAttribute == null) ? null : lockingAttribute.getName();
VirtualDataSourceFragment fragment = (VirtualDataSourceFragment)getFragment();
for (int i = 0, nSize = updateList.size(); i < nSize; i++)
{
UpdateMappingCase update = (UpdateMappingCase)updateList.get(i);
BitSet updateAttrSet = update.getAttributeSet();
ArrayList tobjList = new ArrayList(nEnd - nStart);
int nUpdateAttrCount = updateAttrSet.cardinality() + ((nLockingOrdinal >= 0) ? 1 : 0);
boolean bIgnoreDirty = !update.isDirty();
boolean bFull = update.isFull();
for (int k = nStart; k < nEnd; k++)
{
VirtualUpdate work = (VirtualUpdate)workArray[k];
Instance instance = work.getInstance();
TransferObject tobj = new TransferObject(instance.getOID(), metaclass.getName(), EVENT, nUpdateAttrCount);
if (bFull)
{
for (int m = 0, nCount = metaclass.getInstanceAttributeCount(); m < nCount; m++)
{
Attribute attribute = metaclass.getInstanceAttribute(m);
if (bIgnoreDirty || instance.isDirty(m))
{
setValue(tobj, attribute, instance.getValue(m));
}
}
}
else
{
for (int m = updateAttrSet.nextSetBit(0); m >= 0; m = updateAttrSet.nextSetBit(m + 1))
{
Attribute attribute = metaclass.getInstanceAttribute(m);
if (bIgnoreDirty || instance.isDirty(m))
{
setValue(tobj, attribute, instance.getValue(m));
}
}
}
if (nLockingOrdinal >= 0)
{
tobj.setValue(sLockingAttributeName, instance.getValue(nLockingOrdinal));
}
tobjList.add(tobj);
}
boolean bError = true;
try
{
update.invoke(tobjList, m_adapter.getInvocationContext().getMachine(), fragment);
bError = false;
}
finally
{
// Set new locking values