Responsibilities:
org.eclipse.persistence.indirection.IndirectContainer
| Modifier and Type | Field and Description |
|---|---|
| private Class | |
| private String | |
| private transient Constructor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork)
Overrides org. |
| protected IndirectContainer | buildContainer(final ValueHolderInterface<?> valueHolder)
Build a container with the initialized constructor. |
| public Object | buildIndirectObject(ValueHolderInterface<T> valueHolder)
Overrides org. |
| 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)Overrides org. |
| public AbstractRecord | extractReferenceRow(Object referenceObject)
Overrides org. |
| public Class | |
| public String | |
| protected Constructor | |
| public Object | getOriginalIndirectionObject(Object unitOfWorkIndirectionObject, AbstractSession session)
Overrides org. |
| public Object | getOriginalIndirectionObjectForMerge(Object unitOfWorkIndirectionObject, AbstractSession session)
INTERNAL:
Return the original indirection object for a unit of work indirection object.
|
| public Object | getRealAttributeValueFromObject(Object object, Object attribute)
Overrides org. |
| public void | initialize()
Overrides org. |
| public boolean | isAttributeValueFullyBuilt(Object attributeValue)
Overrides org. |
| public void | iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue)
Overrides org. |
| public Object | nullValueFromRow()
Overrides org. |
| public boolean | objectIsEasilyInstantiated(Object object)
Overrides org. |
| public boolean | objectIsInstantiated(Object object)
Overrides org. |
| public void | reset(Object target)
Overrides org. |
| public void | setContainerClass(Class<?> containerClass)
Sets the Container class which implements IndirectContainer |
| public void | |
| public void | setRealAttributeValueInObject(Object target, Object attributeValue)
Overrides org. |
| protected boolean | typeIsValid(Class<?> attributeType)
Overrides org. |
| public Object | validateAttributeOfInstantiatedObject(Object attributeValue)
INTERNAL:
Verify that the value of the attribute within an instantiated object
is of the appropriate type for the indirection policy.
|
| public Object | valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)
Overrides org. |
| public Object | valueFromMethod(Object object, AbstractRecord row, AbstractSession session)
Overrides org. |
| public Object | valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session)
Overrides org. |
| public Object | valueFromRow(Object object)
Overrides org. |
| containerClass | back to summary |
|---|---|
| private Class<?> containerClass | |
| containerClassName | back to summary |
|---|---|
| private String containerClassName | |
| containerConstructor | back to summary |
|---|---|
| private transient Constructor<?> containerConstructor | |
| ContainerIndirectionPolicy | back to summary |
|---|---|
| public ContainerIndirectionPolicy() INTERNAL: Construct a new indirection policy. | |
| backupCloneAttribute | back to summary |
|---|---|
| public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork) Overrides org. INTERNAL: Return a backup clone of the attribute.
| |
| buildContainer | back to summary |
|---|---|
| protected IndirectContainer Build a container with the initialized constructor. | |
| buildIndirectObject | back to summary |
|---|---|
| public Object buildIndirectObject(ValueHolderInterface<T> valueHolder) Overrides org. 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.
| |
| cloneAttribute | back to summary |
|---|---|
| public Object cloneAttribute(Object attributeValue, Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession, boolean buildDirectlyFromRow) Overrides org. INTERNAL: Return a clone of the attribute.
| |
| extractReferenceRow | back to summary |
|---|---|
| public AbstractRecord extractReferenceRow(Object referenceObject) Overrides org. 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.
| |
| getContainerClass | back to summary |
|---|---|
| public Class Returns the Container class which implements IndirectContainer. | |
| getContainerClassName | back to summary |
|---|---|
| public String getContainerClassName() INTERNAL: Used by MW. | |
| getContainerConstructor | back to summary |
|---|---|
protected Constructor
| |
| getOriginalIndirectionObject | back to summary |
|---|---|
| public Object getOriginalIndirectionObject(Object unitOfWorkIndirectionObject, AbstractSession session) Overrides org. INTERNAL: Return the original indirection object for a unit of work indirection object.
| |
| getOriginalIndirectionObjectForMerge | back to summary |
|---|---|
| public Object getOriginalIndirectionObjectForMerge(Object unitOfWorkIndirectionObject, AbstractSession session) INTERNAL: Return the original indirection object for a unit of work indirection object.
| |
| getRealAttributeValueFromObject | back to summary |
|---|---|
| public Object getRealAttributeValueFromObject(Object object, Object attribute) Overrides org. INTERNAL: Return the "real" attribute value, as opposed to any wrapper. This will trigger the wrapper to instantiate the value.
| |
| initialize | back to summary |
|---|---|
| public void initialize() Overrides org. INTERNAL: Ensure the container class implements IndirectContainer and that it has a constructor which can be used.
| |
| isAttributeValueFullyBuilt | back to summary |
|---|---|
| public boolean isAttributeValueFullyBuilt(Object attributeValue) Overrides org. 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
| |
| iterateOnAttributeValue | back to summary |
|---|---|
| public void iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue) Overrides org. INTERNAL: Iterate over the specified attribute value,
| |
| nullValueFromRow | back to summary |
|---|---|
| public Object nullValueFromRow() Overrides org. 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. In this case, return an empty ValueHolder.
| |
| objectIsEasilyInstantiated | back to summary |
|---|---|
| public boolean objectIsEasilyInstantiated(Object object) Overrides org. INTERNAL: Return whether the specified object can be instantiated without database access.
| |
| objectIsInstantiated | back to summary |
|---|---|
| public boolean objectIsInstantiated(Object object) Overrides org. INTERNAL: Return whether the specified object is instantiated.
| |
| reset | back to summary |
|---|---|
| public void reset(Object target) Overrides org. Reset the wrapper used to store the value.
| |
| setContainerClass | back to summary |
|---|---|
| public void setContainerClass(Class<?> containerClass) Sets the Container class which implements IndirectContainer | |
| setContainterClassName | back to summary |
|---|---|
| public void setContainterClassName(String containerClassName) Set the container classname for the MW | |
| setRealAttributeValueInObject | back to summary |
|---|---|
| public void setRealAttributeValueInObject(Object target, Object attributeValue) Overrides org. INTERNAL: Set the value of the appropriate attribute of target to attributeValue. In this case, place the value inside the target's ValueHolder.
| |
| typeIsValid | back to summary |
|---|---|
| protected boolean typeIsValid(Class<?> attributeType) Overrides org. INTERNAL: Return whether the type is appropriate for the indirection policy. In this case, the type must either be assignable from IndirectContainer or allow the conatinerClass to be assigned to it.
| |
| validateAttributeOfInstantiatedObject | back to summary |
|---|---|
| public Object validateAttributeOfInstantiatedObject(Object attributeValue) 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 a ValueHolderInterface.
| |
| valueFromBatchQuery | back to summary |
|---|---|
| public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey) Overrides org. 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 a ValueHolder for later invocation.
| |
| valueFromMethod | back to summary |
|---|---|
| public Object valueFromMethod(Object object, AbstractRecord row, AbstractSession session) Overrides org. 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. In this case, wrap the row in a ValueHolder for later use.
| |
| valueFromQuery | back to summary |
|---|---|
| public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session) Overrides org. 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 a ValueHolder for later invocation.
| |
| valueFromRow | back to summary |
|---|---|
| public Object valueFromRow(Object object) Overrides org. INTERNAL: Return the value to be stored in the object's attribute. This value is determined by the row. In this case, simply wrap the object in a ValueHolder.
| |