public class ContainerIndirectionPolicy extends BasicIndirectionPolicy
Responsibilities:
IndirectContainer,
Serialized Form| Constructor 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, valueFromQueryclone, getMapping, instantiateObject, isWeavedObjectBasicIndirectionPolicy, objectIsInstantiatedOrChanged, setMapping, setRealAttributeValueInObject, setUseLazyInstantiation, shouldUseLazyInstantiation, usesIndirection, usesTransparentIndirection, validateContainerPolicy, validateDeclaredAttributeTypeForCollection, validateGetMethodReturnTypeForCollection, validateSetMethodParameterTypeForCollectionpublic ContainerIndirectionPolicy()
public java.lang.Object backupCloneAttribute(java.lang.Object attributeValue,
java.lang.Object clone,
java.lang.Object backup,
UnitOfWorkImpl unitOfWork)
backupCloneAttribute in class BasicIndirectionPolicypublic java.lang.Object buildIndirectObject(ValueHolderInterface valueHolder)
buildIndirectObject in class BasicIndirectionPolicypublic 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 BasicIndirectionPolicybuildDirectlyFromRow - 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 BasicIndirectionPolicypublic java.lang.Class getContainerClass()
public java.lang.String getContainerClassName()
public java.lang.Object getOriginalIndirectionObject(java.lang.Object unitOfWorkIndirectionObject,
AbstractSession session)
getOriginalIndirectionObject in class BasicIndirectionPolicypublic java.lang.Object getOriginalIndirectionObjectForMerge(java.lang.Object unitOfWorkIndirectionObject,
AbstractSession session)
getOriginalIndirectionObjectForMerge in class BasicIndirectionPolicypublic java.lang.Object getRealAttributeValueFromObject(java.lang.Object object,
java.lang.Object attribute)
getRealAttributeValueFromObject in class BasicIndirectionPolicypublic void initialize()
initialize in class IndirectionPolicypublic boolean isAttributeValueFullyBuilt(java.lang.Object attributeValue)
isAttributeValueFullyBuilt in class BasicIndirectionPolicyattributeValue - validateAttributeOfInstantiatedObject(Object attributeValue)public void iterateOnAttributeValue(DescriptorIterator iterator, java.lang.Object attributeValue)
iterateOnAttributeValue in class BasicIndirectionPolicypublic java.lang.Object nullValueFromRow()
nullValueFromRow in class BasicIndirectionPolicypublic void reset(java.lang.Object target)
reset in class BasicIndirectionPolicypublic boolean objectIsInstantiated(java.lang.Object object)
objectIsInstantiated in class BasicIndirectionPolicypublic boolean objectIsEasilyInstantiated(java.lang.Object object)
objectIsEasilyInstantiated in class BasicIndirectionPolicypublic 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 BasicIndirectionPolicypublic java.lang.Object validateAttributeOfInstantiatedObject(java.lang.Object attributeValue)
validateAttributeOfInstantiatedObject in class BasicIndirectionPolicypublic java.lang.Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)
valueFromBatchQuery in class BasicIndirectionPolicypublic java.lang.Object valueFromMethod(java.lang.Object object,
AbstractRecord row,
AbstractSession session)
valueFromMethod in class BasicIndirectionPolicypublic java.lang.Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session)
valueFromQuery in class BasicIndirectionPolicypublic java.lang.Object valueFromRow(java.lang.Object object)
valueFromRow in class BasicIndirectionPolicyEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference