/** * Return the appropriate attribute value. * This method is a hack to allow the aggregate collection * subclass to override.... */ protected Object getAttributeValueFromBackupClone(Object backupClone) { return getAttributeValueFromObject(backupClone); }
/** * Return the appropriate attribute value. * This method is a hack to allow the aggregate collection * subclass to override.... */ protected Object getAttributeValueFromBackupClone(Object backupClone) { return getAttributeValueFromObject(backupClone); }
/** * INTERNAL: * Compare the attributes belonging to this mapping for the objects. */ public boolean compareObjects(Object firstObject, Object secondObject, AbstractSession session) { return compareAttributeValues(getAttributeValueFromObject(firstObject), getAttributeValueFromObject(secondObject), session); }
/** * INTERNAL: * An object has been serialized from the server to the remote client. * Replace the transient attributes of the remote value holders * with client-side objects. */ public void fixObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, DistributedSession session) { Object attributeValue = getAttributeValueFromObject(object); fixAttributeValue(attributeValue, objectDescriptors, processedObjects, query, session); }
/** * INTERNAL: * An object has been serialized from the server to the remote client. * Replace the transient attributes of the remote value holders * with client-side objects. */ public void fixObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, RemoteSession session) { Object attributeValue = getAttributeValueFromObject(object); fixAttributeValue(attributeValue, objectDescriptors, processedObjects, query, session); }
/** * Force instantiation of all indirections. */ @Override public void loadAll(Object object, AbstractSession session, IdentityHashSet loaded) { Object value = getAttributeValueFromObject(object); if (value != null) { getObjectBuilder(value, session).loadAll(value, session); } }
/** * INTERNAL: * Iterate on the appropriate attribute value. */ public void iterate(DescriptorIterator iterator) { iterateOnAttributeValue(iterator, getAttributeValueFromObject(iterator.getVisitedParent())); }
/** * INTERNAL: * Clone the attribute from the clone and assign it to the backup. */ public void buildBackupClone(Object clone, Object backup, UnitOfWorkImpl unitOfWork) { Object attributeValue = getAttributeValueFromObject(clone); setAttributeValueInObject(backup, buildBackupClonePart(attributeValue, unitOfWork)); }
/** * INTERNAL: * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ @Override public void buildCopy(Object copy, Object original, CopyGroup group) { Object attributeValue = getAttributeValueFromObject(original); setAttributeValueInObject(copy, buildCopyOfAttributeValue(attributeValue, group)); }
/** * Force instantiation of all indirections. */ @Override public void loadAll(Object object, AbstractSession session, IdentityHashSet loaded) { Object value = getAttributeValueFromObject(object); if (value != null) { getObjectBuilder(value, session).loadAll(value, session); } }
/** * INTERNAL: * Clone the attribute from the original and assign it to the clone. */ @Override public void buildClone(Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession) { Object attributeValue = getAttributeValueFromObject(original); setAttributeValueInObject(clone, buildClonePart(original, clone, cacheKey, attributeValue, refreshCascade, cloningSession)); }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void postUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { postUpdateAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void postDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { postDeleteAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void preDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { preDeleteAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void preInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { preInsertAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void preInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { preInsertAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void postDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { postDeleteAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void postInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { postInsertAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * INTERNAL: * The message is passed to its reference class descriptor. */ public void preUpdate(WriteObjectQuery query) throws DatabaseException, OptimisticLockException { if (!isReadOnly()) { preUpdateAttributeValue(query, getAttributeValueFromObject(query.getObject())); } }
/** * Force instantiation of the load group. */ @Override public void load(final Object object, AttributeItem item, final AbstractSession session, final boolean fromFetchGroup) { if (item.getGroup() != null) { Object value = getAttributeValueFromObject(object); if (value != null) { getObjectBuilder(value, session).load(value, item.getGroup(), session, fromFetchGroup); } } }