Module org.eclipse.persistence.core
Class UnitOfWorkQueryValueHolder<T>
- java.lang.Object
-
- org.eclipse.persistence.internal.indirection.DatabaseValueHolder<T>
-
- org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder<T>
-
- org.eclipse.persistence.internal.indirection.UnitOfWorkQueryValueHolder<T>
-
- All Implemented Interfaces:
Serializable,Cloneable,ValueHolderInterface<T>,WeavedAttributeValueHolderInterface<T>,WrappingValueHolder<T>
public class UnitOfWorkQueryValueHolder<T> extends UnitOfWorkValueHolder<T>
UnitOfWorkQueryValueHolder wraps a database-stored object and implements behavior to access it. The object is read from the database by invoking a user-specified query. This value holder is used only in the unit of work.- Author:
- Sati
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder
backupValueHolder, mapping, relationshipSourceObject, remoteUnitOfWork, sourceAttributeName, sourceObject, wrappedValueHolder, wrappedValueHolderRemoteID
-
Fields inherited from class org.eclipse.persistence.internal.indirection.DatabaseValueHolder
isCoordinatedWithProperty, isInstantiated, row, session, value
-
Fields inherited from interface org.eclipse.persistence.indirection.ValueHolderInterface
shouldToStringInstantiate
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnitOfWorkQueryValueHolder()protectedUnitOfWorkQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, DatabaseMapping mapping, UnitOfWorkImpl unitOfWork)UnitOfWorkQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, ForeignReferenceMapping mapping, AbstractRecord row, UnitOfWorkImpl unitOfWork)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectbuildBackupCloneFor(Object cloneAttributeValue)Backup the clone attribute value.TbuildCloneFor(Object originalAttributeValue)Clone the original attribute value.voidsetValue(T theValue)Ensure that the backup value holder is populated.voidupdateForeignReferenceRemove(Object value)INTERNAL: Here we now must check for bi-directional relationship.voidupdateForeignReferenceSet(Object value, Object oldValue)INTERNAL: Here we now must check for bi-directional relationship.-
Methods inherited from class org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder
getBackupValueHolder, getMapping, getRelationshipSourceObject, getRemoteUnitOfWork, getSourceAttributeName, getSourceObject, getUnitOfWork, getValueFromServerObject, getWrappedValueHolder, getWrappedValueHolderRemoteID, instantiate, instantiateForUnitOfWorkValueHolder, instantiateImpl, isEasilyInstantiated, isPessimisticLockingValueHolder, isSerializedRemoteUnitOfWorkValueHolder, releaseWrappedValueHolder, resetFields, setBackupValueHolder, setMapping, setRelationshipSourceObject, setRemoteUnitOfWork, setSourceAttributeName, setSourceObject, setWrappedValueHolder, shouldAllowInstantiationDeferral
-
Methods inherited from class org.eclipse.persistence.internal.indirection.DatabaseValueHolder
clone, getRow, getSession, getValue, getValue, isCoordinatedWithProperty, isInstantiated, isNewlyWeavedValueHolder, isTransactionalValueHolder, postInstantiate, privilegedSetValue, setInstantiated, setIsCoordinatedWithProperty, setIsNewlyWeavedValueHolder, setRow, setSession, setUninstantiated, toString
-
-
-
-
Constructor Detail
-
UnitOfWorkQueryValueHolder
protected UnitOfWorkQueryValueHolder()
-
UnitOfWorkQueryValueHolder
protected UnitOfWorkQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, DatabaseMapping mapping, UnitOfWorkImpl unitOfWork)
-
UnitOfWorkQueryValueHolder
public UnitOfWorkQueryValueHolder(ValueHolderInterface<T> attributeValue, Object clone, ForeignReferenceMapping mapping, AbstractRecord row, UnitOfWorkImpl unitOfWork)
-
-
Method Detail
-
buildBackupCloneFor
protected Object buildBackupCloneFor(Object cloneAttributeValue)
Backup the clone attribute value.- Specified by:
buildBackupCloneForin classUnitOfWorkValueHolder<T>
-
buildCloneFor
public T buildCloneFor(Object originalAttributeValue)
Clone the original attribute value.- Specified by:
buildCloneForin classUnitOfWorkValueHolder<T>
-
setValue
public void setValue(T theValue)
Ensure that the backup value holder is populated.- Specified by:
setValuein interfaceValueHolderInterface<T>- Overrides:
setValuein classDatabaseValueHolder<T>
-
updateForeignReferenceRemove
public void updateForeignReferenceRemove(Object value)
INTERNAL: Here we now must check for bi-directional relationship. If the mapping has a relationship partner then we must maintain the original relationship. We only worry about ObjectReferenceMappings as the collections mappings will be handled by transparentIndirection
-
updateForeignReferenceSet
public void updateForeignReferenceSet(Object value, Object oldValue)
INTERNAL: Here we now must check for bi-directional relationship. If the mapping has a relationship partner then we must maintain the original relationship. We only worry about ObjectReferenceMappings as the collections mappings will be handled by transparentIndirection
-
-