Top Description Fields Constructors Methods
org.eclipse.persistence.internal.indirection

public Class TransparentIndirectionPolicy

extends IndirectionPolicy
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.descriptors.changetracking.*, org.eclipse.persistence.mappings.*, org.eclipse.persistence.queries.*, org.eclipse.persistence.indirection.*, org.eclipse.persistence.sessions.remote.*, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.internal.descriptors.*, org.eclipse.persistence.internal.queries.*, org.eclipse.persistence.internal.sessions.remote.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.internal.identitymaps.CacheKey, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .MergeManager, .UnitOfWorkImpl

Purpose

: TransparentIndirectionPolicy implements the behavior necessary for a a CollectionMapping to use IndirectContainers to delay the reading of objects from the database until they are actually needed.
Author
Big Country
Since
TOPLink/Java 2.5
See Also
CollectionMapping, IndirectContainer

Field Summary

Modifier and TypeField and Description
protected ContainerPolicy
containerPolicy

PERF: Cache the mappings container policy.

protected static Integer
protected Boolean
useLazyInstantiation

IndirectList and IndirectSet can be configured not to instantiate the list from the database when you add and remove from them.

Inherited from org.eclipse.persistence.internal.indirection.IndirectionPolicy:
mapping

Constructor Summary

AccessConstructor and Description
public
TransparentIndirectionPolicy()

INTERNAL: Construct a new indirection policy.

Method Summary

Modifier and TypeMethod and Description
public Object
backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.backupCloneAttribute.

INTERNAL: Return a backup clone of the attribute.
protected Object
buildBackupClone(IndirectContainer<C> container)

INTERNAL: Return a backup clone of a clone container that has not been read from the database yet.

protected IndirectContainer<C>
buildIndirectContainer()

Construct and return an instance of the specified indirect container class.

protected Object
buildIndirectContainer(ValueHolderInterface<T> valueHolder)

Return a new IndirectContainer with the specified value holder.

public Object
buildIndirectObject(ValueHolderInterface<T> valueHolder)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.buildIndirectObject.

INTERNAL: This method can be used when an Indirection Object is required to be built from a provided ValueHolderInterface object.
public Object
cloneAttribute(Object attributeValue, Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession, boolean
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.
buildDirectlyFromRow
)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.cloneAttribute.

Return a clone of the attribute.
protected boolean
containerPolicyIsValid()

INTERNAL: Return whether the container policy is valid for the indirection policy.

public Object
extractPrimaryKeyForReferenceObject(Object referenceObject, AbstractSession session)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.extractPrimaryKeyForReferenceObject.

INTERNAL: Return the primary key for the reference object (i.e. the object object referenced by domainObject and specified by mapping).
public AbstractRecord
extractReferenceRow(Object referenceObject)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.extractReferenceRow.

INTERNAL: Return the reference row for the reference object.
public void
fixObjectReferences(Object object, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, DistributedSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.fixObjectReferences.

INTERNAL: An object has been serialized from the server to the client.
protected Class<?>
getContainerClass()

INTERNAL: Return the container class for the mapping.

protected ContainerPolicy
getContainerPolicy()

INTERNAL: Return the container policy for the mapping.

protected static int
getDefaultContainerSize()

INTERNAL: Return the the size to of container to create.

public Object
getOriginalIndirectionObject(Object unitOfWorkIndirectionObject, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getOriginalIndirectionObject.

INTERNAL: Return the original indirection object for a unit of work indirection object.
public Object
getOriginalIndirectionObjectForMerge(Object unitOfWorkIndirectionObject, AbstractSession session)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.getOriginalIndirectionObjectForMerge.

INTERNAL: Return the original indirection object for a unit of work indirection object.
public Object
getOriginalValueHolder(Object unitOfWorkIndirectionObject, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getOriginalValueHolder.

INTERNAL: Return the original valueHolder object.
public Object
getRealAttributeValueFromObject(Object object, Object attribute)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getRealAttributeValueFromObject.

INTERNAL: Return the "real" attribute value, as opposed to any wrapper.
public Boolean
public Object
getValueFromRemoteValueHolder(RemoteValueHolder<?> remoteValueHolder)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getValueFromRemoteValueHolder.

INTERNAL: Extract and return the appropriate value from the specified remote value holder.
public void
instantiateObject(Object object, Object attribute)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.instantiateObject.

INTERNAL: Trigger the instantiation of the value.
public boolean
isAttributeValueFullyBuilt(Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.isAttributeValueFullyBuilt.

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.
public void
iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.iterateOnAttributeValue.

INTERNAL: Iterate over the specified attribute value.
public void
mergeRemoteValueHolder(Object clientSideDomainObject, Object serverSideDomainObject, MergeManager mergeManager)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.mergeRemoteValueHolder.

INTERNAL Replace the client value holder with the server value holder, after copying some of the settings from the client value holder.
public Object
nullValueFromRow()

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.nullValueFromRow.

INTERNAL: Return the null value of the appropriate attribute.
public boolean
objectIsEasilyInstantiated(Object object)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.objectIsEasilyInstantiated.

INTERNAL: Return whether the specified object can be instantiated without database access.
public boolean
objectIsInstantiated(Object object)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.objectIsInstantiated.

INTERNAL: Return whether the specified object is instantiated.
public boolean
objectIsInstantiatedOrChanged(Object object)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.objectIsInstantiatedOrChanged.

INTERNAL: Return whether the specified object is instantiated, or if it has changes.
public static void
setDefaultContainerSize(int defaultSize)

ADVANCED: Set the size to of container to create.

public void
setRealAttributeValueInObject(Object target, Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.setRealAttributeValueInObject.

INTERNAL: Set the value of the appropriate attribute of target to attributeValue.
public void
setSourceObject(Object sourceObject, Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.setSourceObject.

INTERNAL: set the source object into QueryBasedValueHolder.
public void
setUseLazyInstantiation(Boolean useLazyInstantiation)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.setUseLazyInstantiation.

ADVANCED: IndirectList and IndirectSet can be configured not to instantiate the list from the database when you add and remove from them.
public Boolean
shouldUseLazyInstantiation()

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.shouldUseLazyInstantiation.

ADVANCED: IndirectList and IndirectSet can be configured not to instantiate the list from the database when you add and remove from them.
protected boolean
typeIsValid(Class<?> declaredType)

INTERNAL: Return whether the type is appropriate for the indirection policy.

public boolean
usesTransparentIndirection()

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.usesTransparentIndirection.

INTERNAL: Return whether the indirection policy uses transparent indirection.
public Object
validateAttributeOfInstantiatedObject(Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateAttributeOfInstantiatedObject.

INTERNAL: Verify that the value of the attribute within an instantiated object is of the appropriate type for the indirection policy.
public void
validateContainerPolicy(IntegrityChecker checker)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateContainerPolicy.

INTERNAL: Verify that the container policy is compatible with the indirection policy.
public void
validateDeclaredAttributeType(Class<?> attributeType, IntegrityChecker checker)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateDeclaredAttributeType.

INTERNAL: Verify that attributeType is correct for the indirection policy.
public void
validateGetMethodReturnType(Class<?> returnType, IntegrityChecker checker)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateGetMethodReturnType.

INTERNAL: Verify that getter returnType is correct for the indirection policy.
public void
validateSetMethodParameterType(Class<?> parameterType, IntegrityChecker checker)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateSetMethodParameterType.

INTERNAL: Verify that setter parameterType is correct for the indirection policy.
protected String
validTypeName()

INTERNAL: Return the type that is appropriate for the indirection policy.

public Object
valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromBatchQuery.

INTERNAL: Return the value to be stored in the object's attribute.
public Object
valueFromMethod(Object object, AbstractRecord row, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromMethod.

INTERNAL: Return the value to be stored in the object's attribute.
public Object
valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromQuery.

INTERNAL: Return the value to be stored in the object's attribute.
public Object
valueFromQuery(ReadQuery query, AbstractRecord row, Object object, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromQuery.

INTERNAL: A combination of valueFromQuery and valueFromRow(object).
public Object
valueFromRow(Object object)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromRow.

INTERNAL: Return the value to be stored in the object's attribute.
Inherited from org.eclipse.persistence.internal.indirection.IndirectionPolicy:
buildCascadeQueryclonegetCollectionMappinggetForeignReferenceMappinggetMappinggetOneToOneMappinggetTransformationMappinginitializeisWeavedObjectBasicIndirectionPolicymergeClientIntoServerValueHolderresetsetMappingsetRealAttributeValueInObjectusesIndirectionvalidateDeclaredAttributeTypeForCollectionvalidateGetMethodReturnTypeForCollectionvalidateSetMethodParameterTypeForCollection

Field Detail

containerPolicyback to summary
protected ContainerPolicy containerPolicy

PERF: Cache the mappings container policy.

defaultContainerSizeback to summary
protected static Integer defaultContainerSize
useLazyInstantiationback to summary
protected Boolean useLazyInstantiation

IndirectList and IndirectSet can be configured not to instantiate the list from the database when you add and remove from them. IndirectList defaults to this behavior. When Set to true, the collection associated with this TransparentIndirection will be setup so as not to instantiate for adds and removes. The weakness of this setting for an IndirectSet is that when the set is not instantiated, if a duplicate element is added, it will not be detected until commit time.

Constructor Detail

TransparentIndirectionPolicyback to summary
public TransparentIndirectionPolicy()

INTERNAL: Construct a new indirection policy.

Method Detail

backupCloneAttributeback to summary
public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.backupCloneAttribute.

INTERNAL: Return a backup clone of the attribute.

Annotations
@Override
buildBackupCloneback to summary
protected Object buildBackupClone(IndirectContainer<C> container)

INTERNAL: Return a backup clone of a clone container that has not been read from the database yet. This is used by the indirection policy to hook together a UOW clone with its backup clone - only when the clone (the working copy returned to the user) instantiates its contents from the database will these contents be copied to the backup clone.

buildIndirectContainerback to summary
protected IndirectContainer<C> buildIndirectContainer()

Construct and return an instance of the specified indirect container class.

buildIndirectContainerback to summary
protected Object buildIndirectContainer(ValueHolderInterface<T> valueHolder)

Return a new IndirectContainer with the specified value holder.

buildIndirectObjectback to summary
public Object buildIndirectObject(ValueHolderInterface<T> valueHolder)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.buildIndirectObject.

INTERNAL: This method can be used when an Indirection Object is required to be built from a provided ValueHolderInterface object. This may be used for custom value holder types. Certain policies like the TransparentIndirectionPolicy may wrap the valueholder in another object.

Annotations
@Override
cloneAttributeback to summary
public Object cloneAttribute(Object attributeValue, Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession, boolean buildDirectlyFromRow)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.cloneAttribute.

Return a clone of the attribute.

Parameters
buildDirectlyFromRow:boolean

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.

Annotations
@Override
containerPolicyIsValidback to summary
protected boolean containerPolicyIsValid()

INTERNAL: Return whether the container policy is valid for the indirection policy. In this case, the container policy MUST be configured for an IndirectContainer.

extractPrimaryKeyForReferenceObjectback to summary
public Object extractPrimaryKeyForReferenceObject(Object referenceObject, AbstractSession session)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.extractPrimaryKeyForReferenceObject.

INTERNAL: Return the primary key for the reference object (i.e. the object object referenced by domainObject and specified by mapping). This key will be used by a RemoteValueHolder. OneToOneMappings should not be using transparent direction.

Annotations
@Override
extractReferenceRowback to summary
public AbstractRecord extractReferenceRow(Object referenceObject)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.extractReferenceRow.

INTERNAL: Return the reference row for the reference object. This allows the new row to be built without instantiating the reference object. Return null if the object has already been instantiated.

Annotations
@Override
fixObjectReferencesback to summary
public void fixObjectReferences(Object object, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, DistributedSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.fixObjectReferences.

INTERNAL: An object has been serialized from the server to the client. Replace the transient attributes of the remote value holders with client-side objects.

Annotations
@Override
getContainerClassback to summary
protected Class<?> getContainerClass()

INTERNAL: Return the container class for the mapping.

getContainerPolicyback to summary
protected ContainerPolicy getContainerPolicy()

INTERNAL: Return the container policy for the mapping.

getDefaultContainerSizeback to summary
protected static int getDefaultContainerSize()

INTERNAL: Return the the size to of container to create. Default to using default constructor.

getOriginalIndirectionObjectback to summary
public Object getOriginalIndirectionObject(Object unitOfWorkIndirectionObject, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getOriginalIndirectionObject.

INTERNAL: Return the original indirection object for a unit of work indirection object.

Annotations
@Override
getOriginalIndirectionObjectForMergeback to summary
public Object getOriginalIndirectionObjectForMerge(Object unitOfWorkIndirectionObject, AbstractSession session)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.getOriginalIndirectionObjectForMerge.

INTERNAL: Return the original indirection object for a unit of work indirection object.

Annotations
@Override
getOriginalValueHolderback to summary
public Object getOriginalValueHolder(Object unitOfWorkIndirectionObject, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getOriginalValueHolder.

INTERNAL: Return the original valueHolder object. Access to the underlying valueholder may be required when serializing the valueholder or converting the valueHolder to another type.

Annotations
@Override
getRealAttributeValueFromObjectback to summary
public Object getRealAttributeValueFromObject(Object object, Object attribute)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getRealAttributeValueFromObject.

INTERNAL: Return the "real" attribute value, as opposed to any wrapper. This will trigger the wrapper to instantiate the value.

Annotations
@Override
getUseLazyInstantiationback to summary
public Boolean getUseLazyInstantiation()
getValueFromRemoteValueHolderback to summary
public Object getValueFromRemoteValueHolder(RemoteValueHolder<?> remoteValueHolder)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.getValueFromRemoteValueHolder.

INTERNAL: Extract and return the appropriate value from the specified remote value holder.

Annotations
@Override
instantiateObjectback to summary
public void instantiateObject(Object object, Object attribute)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.instantiateObject.

INTERNAL: Trigger the instantiation of the value.

Annotations
@Override
isAttributeValueFullyBuiltback to summary
public boolean isAttributeValueFullyBuilt(Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.isAttributeValueFullyBuilt.

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. Return whether this will happen. This method is used to help determine if indirection has been triggered

Annotations
@Override
See Also
validateAttributeOfInstantiatedObject(Object)
iterateOnAttributeValueback to summary
public void iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.iterateOnAttributeValue.

INTERNAL: Iterate over the specified attribute value.

Annotations
@Override
mergeRemoteValueHolderback to summary
public void mergeRemoteValueHolder(Object clientSideDomainObject, Object serverSideDomainObject, MergeManager mergeManager)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.mergeRemoteValueHolder.

INTERNAL Replace the client value holder with the server value holder, after copying some of the settings from the client value holder.

Annotations
@Override
nullValueFromRowback to summary
public Object nullValueFromRow()

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.nullValueFromRow.

INTERNAL: Return the null value of the appropriate attribute. That is, the field from the database is NULL, return what should be placed in the object's attribute as a result. OneToOneMappings should not be using transparent direction.

Annotations
@Override
objectIsEasilyInstantiatedback to summary
public boolean objectIsEasilyInstantiated(Object object)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.objectIsEasilyInstantiated.

INTERNAL: Return whether the specified object can be instantiated without database access.

Annotations
@Override
objectIsInstantiatedback to summary
public boolean objectIsInstantiated(Object object)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.objectIsInstantiated.

INTERNAL: Return whether the specified object is instantiated.

Annotations
@Override
objectIsInstantiatedOrChangedback to summary
public boolean objectIsInstantiatedOrChanged(Object object)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.objectIsInstantiatedOrChanged.

INTERNAL: Return whether the specified object is instantiated, or if it has changes.

Annotations
@Override
setDefaultContainerSizeback to summary
public static void setDefaultContainerSize(int defaultSize)

ADVANCED: Set the size to of container to create. Default to using default constructor.

setRealAttributeValueInObjectback to summary
public void setRealAttributeValueInObject(Object target, Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.setRealAttributeValueInObject.

INTERNAL: Set the value of the appropriate attribute of target to attributeValue. If the Target has yet to be instantiated then we need to instantiate the target to ensure that the backup clone is instantiated for comparison.

Annotations
@Override
setSourceObjectback to summary
public void setSourceObject(Object sourceObject, Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.setSourceObject.

INTERNAL: set the source object into QueryBasedValueHolder.

Annotations
@Override
setUseLazyInstantiationback to summary
public void setUseLazyInstantiation(Boolean useLazyInstantiation)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.setUseLazyInstantiation.

ADVANCED: IndirectList and IndirectSet can be configured not to instantiate the list from the database when you add and remove from them. IndirectList defaults to this behavior. When Set to true, the collection associated with this TransparentIndirection will be setup so as not to instantiate for adds and removes. The weakness of this setting for an IndirectSet is that when the set is not instantiated, if a duplicate element is added, it will not be detected until commit time.

Annotations
@Override
shouldUseLazyInstantiationback to summary
public Boolean shouldUseLazyInstantiation()

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.shouldUseLazyInstantiation.

ADVANCED: IndirectList and IndirectSet can be configured not to instantiate the list from the database when you add and remove from them. IndirectList defaults to this behavior. When Set to true, the collection associated with this TransparentIndirection will be setup so as not to instantiate for adds and removes. The weakness of this setting for an IndirectSet is that when the set is not instantiated, if a duplicate element is added, it will not be detected until commit time.

Annotations
@Override
typeIsValidback to summary
protected boolean typeIsValid(Class<?> declaredType)

INTERNAL: Return whether the type is appropriate for the indirection policy. In this case, the attribute type MUST be compatible with the one specified by the ContainerPolicy (i.e. either the container policy class is a subclass of the declared type [jdk1.1] or the container policy class implements the declared interface [jdk1.2]).

usesTransparentIndirectionback to summary
public boolean usesTransparentIndirection()

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.usesTransparentIndirection.

INTERNAL: Return whether the indirection policy uses transparent indirection.

Annotations
@Override
validateAttributeOfInstantiatedObjectback to summary
public Object validateAttributeOfInstantiatedObject(Object attributeValue)

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateAttributeOfInstantiatedObject.

INTERNAL: Verify that the value of the attribute within an instantiated object is of the appropriate type for the indirection policy. In this case, the attribute must be non-null and it must be at least a subclass or implementor of the container type. If the value is null return a new indirection object to be used for the attribute.

Annotations
@Override
validateContainerPolicyback to summary
public void validateContainerPolicy(IntegrityChecker checker) throws DescriptorException

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateContainerPolicy.

INTERNAL: Verify that the container policy is compatible with the indirection policy. If it is incorrect, add an exception to the integrity checker.

Annotations
@Override
validateDeclaredAttributeTypeback to summary
public void validateDeclaredAttributeType(Class<?> attributeType, IntegrityChecker checker) throws DescriptorException

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateDeclaredAttributeType.

INTERNAL: Verify that attributeType is correct for the indirection policy. If it is incorrect, add an exception to the integrity checker. In this case, the attribute type MUST be compatible with the one specified by the ContainerPolicy.

Annotations
@Override
validateGetMethodReturnTypeback to summary
public void validateGetMethodReturnType(Class<?> returnType, IntegrityChecker checker) throws DescriptorException

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateGetMethodReturnType.

INTERNAL: Verify that getter returnType is correct for the indirection policy. If it is incorrect, add an exception to the integrity checker. In this case, the attribute type MUST be compatible with the one specified by the ContainerPolicy.

Annotations
@Override
validateSetMethodParameterTypeback to summary
public void validateSetMethodParameterType(Class<?> parameterType, IntegrityChecker checker) throws DescriptorException

Overrides org.eclipse.persistence.internal.indirection.IndirectionPolicy.validateSetMethodParameterType.

INTERNAL: Verify that setter parameterType is correct for the indirection policy. If it is incorrect, add an exception to the integrity checker. In this case, the attribute type MUST be compatible with the one specified by the ContainerPolicy.

Annotations
@Override
validTypeNameback to summary
protected String validTypeName()

INTERNAL: Return the type that is appropriate for the indirection policy.

valueFromBatchQueryback to summary
public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromBatchQuery.

INTERNAL: Return the value to be stored in the object's attribute. This value is determined by the batchQuery. In this case, wrap the query in an IndirectContainer for later invocation.

Annotations
@Override
valueFromMethodback to summary
public Object valueFromMethod(Object object, AbstractRecord row, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromMethod.

INTERNAL: Return the value to be stored in the object's attribute. This value is determined by invoking the appropriate method on the object and passing it the row and session. TransformationMappings should not be using transparent direction.

Annotations
@Override
valueFromQueryback to summary
public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromQuery.

INTERNAL: Return the value to be stored in the object's attribute. This value is determined by the query. In this case, wrap the query in an IndirectContainer for later invocation.

Annotations
@Override
valueFromQueryback to summary
public Object valueFromQuery(ReadQuery query, AbstractRecord row, Object object, AbstractSession session)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromQuery.

INTERNAL: A combination of valueFromQuery and valueFromRow(object). Sometimes the attribute is known (joining) but we still need to hang on to the query (pessimistic locking).

Annotations
@Override
valueFromRowback to summary
public Object valueFromRow(Object object)

Implements abstract org.eclipse.persistence.internal.indirection.IndirectionPolicy.valueFromRow.

INTERNAL: Return the value to be stored in the object's attribute. This allows wrapping of the real value, none is required for transparent.

Annotations
@Override