public class ContainerIndirectionPolicy extends BasicIndirectionPolicy
Responsibilities:
IndirectContainer
,
Serialized FormConstructor and Description |
---|
ContainerIndirectionPolicy()
INTERNAL:
Construct a new indirection policy.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
backupCloneAttribute(java.lang.Object attributeValue,
java.lang.Object clone,
java.lang.Object backup,
UnitOfWorkImpl unitOfWork)
INTERNAL:
Return a backup clone of the attribute.
|
java.lang.Object |
buildIndirectObject(ValueHolderInterface valueHolder)
INTERNAL: This method can be used when an Indirection Object is required
to be built from a provided ValueHolderInterface object.
|
java.lang.Object |
cloneAttribute(java.lang.Object attributeValue,
java.lang.Object original,
CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
AbstractSession cloningSession,
boolean buildDirectlyFromRow)
INTERNAL:
Return a clone of the attribute.
|
AbstractRecord |
extractReferenceRow(java.lang.Object referenceObject)
INTERNAL:
Return the reference row for the reference object.
|
java.lang.Class |
getContainerClass()
Returns the Container class which implements IndirectContainer.
|
java.lang.String |
getContainerClassName()
INTERNAL:
Used by MW.
|
java.lang.Object |
getOriginalIndirectionObject(java.lang.Object unitOfWorkIndirectionObject,
AbstractSession session)
INTERNAL:
Return the original indirection object for a unit of work indirection object.
|
java.lang.Object |
getOriginalIndirectionObjectForMerge(java.lang.Object unitOfWorkIndirectionObject,
AbstractSession session)
INTERNAL:
Return the original indirection object for a unit of work indirection object.
|
java.lang.Object |
getRealAttributeValueFromObject(java.lang.Object object,
java.lang.Object attribute)
INTERNAL:
Return the "real" attribute value, as opposed to any wrapper.
|
void |
initialize()
INTERNAL:
Ensure the container class implements IndirectContainer and that it
has a constructor which can be used.
|
boolean |
isAttributeValueFullyBuilt(java.lang.Object attributeValue)
INTERNAL:
The method validateAttributeOfInstantiatedObject(Object attributeValue) fixes the value of the attributeValue
in cases where it is null and indirection requires that it contain some specific data structure.
|
void |
iterateOnAttributeValue(DescriptorIterator iterator,
java.lang.Object attributeValue)
INTERNAL:
Iterate over the specified attribute value,
|
java.lang.Object |
nullValueFromRow()
INTERNAL:
Return the null value of the appropriate attribute.
|
boolean |
objectIsEasilyInstantiated(java.lang.Object object)
INTERNAL:
Return whether the specified object can be instantiated without database access.
|
boolean |
objectIsInstantiated(java.lang.Object object)
INTERNAL:
Return whether the specified object is instantiated.
|
void |
reset(java.lang.Object target)
Reset the wrapper used to store the value.
|
void |
setContainerClass(java.lang.Class containerClass)
Sets the Container class which implements IndirectContainer
|
void |
setContainterClassName(java.lang.String containerClassName)
Set the container classname for the MW
|
void |
setRealAttributeValueInObject(java.lang.Object target,
java.lang.Object attributeValue)
INTERNAL:
Set the value of the appropriate attribute of target to attributeValue.
|
java.lang.Object |
validateAttributeOfInstantiatedObject(java.lang.Object attributeValue)
INTERNAL:
Verify that the value of the attribute within an instantiated object
is of the appropriate type for the indirection policy.
|
java.lang.Object |
valueFromBatchQuery(ReadQuery batchQuery,
AbstractRecord row,
ObjectLevelReadQuery originalQuery,
CacheKey parentCacheKey)
INTERNAL:
Return the value to be stored in the object's attribute.
|
java.lang.Object |
valueFromMethod(java.lang.Object object,
AbstractRecord row,
AbstractSession session)
INTERNAL:
Return the value to be stored in the object's attribute.
|
java.lang.Object |
valueFromQuery(ReadQuery query,
AbstractRecord row,
AbstractSession session)
INTERNAL:
Return the value to be stored in the object's attribute.
|
java.lang.Object |
valueFromRow(java.lang.Object object)
INTERNAL:
Return the value to be stored in the object's attribute.
|
extractPrimaryKeyForReferenceObject, fixObjectReferences, getOriginalValueHolder, getValueFromRemoteValueHolder, mergeRemoteValueHolder, setSourceObject, validateDeclaredAttributeType, validateGetMethodReturnType, validateSetMethodParameterType, valueFromQuery
clone, getMapping, instantiateObject, isWeavedObjectBasicIndirectionPolicy, objectIsInstantiatedOrChanged, setMapping, setRealAttributeValueInObject, setUseLazyInstantiation, shouldUseLazyInstantiation, usesIndirection, usesTransparentIndirection, validateContainerPolicy, validateDeclaredAttributeTypeForCollection, validateGetMethodReturnTypeForCollection, validateSetMethodParameterTypeForCollection
public ContainerIndirectionPolicy()
public java.lang.Object backupCloneAttribute(java.lang.Object attributeValue, java.lang.Object clone, java.lang.Object backup, UnitOfWorkImpl unitOfWork)
backupCloneAttribute
in class BasicIndirectionPolicy
public java.lang.Object buildIndirectObject(ValueHolderInterface valueHolder)
buildIndirectObject
in class BasicIndirectionPolicy
public java.lang.Object cloneAttribute(java.lang.Object attributeValue, java.lang.Object original, CacheKey cacheKey, java.lang.Object clone, java.lang.Integer refreshCascade, AbstractSession cloningSession, boolean buildDirectlyFromRow)
cloneAttribute
in class BasicIndirectionPolicy
buildDirectlyFromRow
- indicates that we are building the clone directly
from a row as opposed to building the original from the row, putting it in
the shared cache, and then cloning the original.public AbstractRecord extractReferenceRow(java.lang.Object referenceObject)
extractReferenceRow
in class BasicIndirectionPolicy
public java.lang.Class getContainerClass()
public java.lang.String getContainerClassName()
public java.lang.Object getOriginalIndirectionObject(java.lang.Object unitOfWorkIndirectionObject, AbstractSession session)
getOriginalIndirectionObject
in class BasicIndirectionPolicy
public java.lang.Object getOriginalIndirectionObjectForMerge(java.lang.Object unitOfWorkIndirectionObject, AbstractSession session)
getOriginalIndirectionObjectForMerge
in class BasicIndirectionPolicy
public java.lang.Object getRealAttributeValueFromObject(java.lang.Object object, java.lang.Object attribute)
getRealAttributeValueFromObject
in class BasicIndirectionPolicy
public void initialize()
initialize
in class IndirectionPolicy
public boolean isAttributeValueFullyBuilt(java.lang.Object attributeValue)
isAttributeValueFullyBuilt
in class BasicIndirectionPolicy
attributeValue
- validateAttributeOfInstantiatedObject(Object attributeValue)
public void iterateOnAttributeValue(DescriptorIterator iterator, java.lang.Object attributeValue)
iterateOnAttributeValue
in class BasicIndirectionPolicy
public java.lang.Object nullValueFromRow()
nullValueFromRow
in class BasicIndirectionPolicy
public void reset(java.lang.Object target)
reset
in class BasicIndirectionPolicy
public boolean objectIsInstantiated(java.lang.Object object)
objectIsInstantiated
in class BasicIndirectionPolicy
public boolean objectIsEasilyInstantiated(java.lang.Object object)
objectIsEasilyInstantiated
in class BasicIndirectionPolicy
public void setContainerClass(java.lang.Class containerClass)
public void setContainterClassName(java.lang.String containerClassName)
public void setRealAttributeValueInObject(java.lang.Object target, java.lang.Object attributeValue)
setRealAttributeValueInObject
in class BasicIndirectionPolicy
public java.lang.Object validateAttributeOfInstantiatedObject(java.lang.Object attributeValue)
validateAttributeOfInstantiatedObject
in class BasicIndirectionPolicy
public java.lang.Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)
valueFromBatchQuery
in class BasicIndirectionPolicy
public java.lang.Object valueFromMethod(java.lang.Object object, AbstractRecord row, AbstractSession session)
valueFromMethod
in class BasicIndirectionPolicy
public java.lang.Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session)
valueFromQuery
in class BasicIndirectionPolicy
public java.lang.Object valueFromRow(java.lang.Object object)
valueFromRow
in class BasicIndirectionPolicy
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference