for (Iterator i = query.getFieldIterator(); i.hasNext(); )
{
Field field = (Field)i.next();
Attribute attribute = field.getAttribute();
FilePrimitiveMapping primitiveMapping = (FilePrimitiveMapping)query.getPersistenceMapping().getAttributeMapping(attribute);
switch (primitiveMapping.getSysId())
{
case FilePrimitiveMapping.SYSID_ID:
instance.setOldValueDirect(attribute.getOrdinal(), oid.getValue(0));
break;
case FilePrimitiveMapping.SYSID_DATA:
Object value = null;
try
{
value = (primitiveMapping.getAttribute().getType() == Primitive.STRING) ?
(Object)directFile.getDataAsString() : directFile.getDataAsBinary();
}
catch (IOException ex)
{
throw new PersistenceException("err.persistence.file.io", ex);