public class BasicIndirectionPolicy extends IndirectionPolicy
ForeignReferenceMapping
,
Serialized Formmapping
Constructor and Description |
---|
BasicIndirectionPolicy()
INTERNAL:
Construct a new indirection policy.
|
Modifier and Type | Method and Description |
---|---|
Object |
backupCloneAttribute(Object attributeValue,
Object clone,
Object backup,
UnitOfWorkImpl unitOfWork)
INTERNAL:
Return a backup clone of the attribute.
|
Object |
cloneAttribute(Object attributeValue,
Object original,
Object clone,
UnitOfWorkImpl unitOfWork,
boolean buildDirectlyFromRow)
INTERNAL:
Return a clone of the attribute.
|
Vector |
extractPrimaryKeyForReferenceObject(Object referenceObject,
AbstractSession session)
INTERNAL:
Return the primary key for the reference object (i.e.
|
AbstractRecord |
extractReferenceRow(Object referenceObject)
INTERNAL:
Return the reference row for the reference object.
|
Object |
getOriginalIndirectionObject(Object unitOfWorkIndirectionObject,
AbstractSession session)
INTERNAL:
Return the original indirection object for a unit of work indirection object.
|
Object |
getRealAttributeValueFromObject(Object object,
Object attribute)
INTERNAL:
Return the "real" attribute value, as opposed to any wrapper.
|
void |
iterateOnAttributeValue(DescriptorIterator iterator,
Object attributeValue)
INTERNAL:
Iterate over the specified attribute value,
|
Object |
nullValueFromRow()
INTERNAL:
Return the null value of the appropriate attribute.
|
boolean |
objectIsInstantiated(Object object)
INTERNAL:
Return whether the specified object is instantiated.
|
void |
setRealAttributeValueInObject(Object target,
Object attributeValue)
INTERNAL:
Set the value of the appropriate attribute of target to attributeValue.
|
protected boolean |
typeIsValid(Class attributeType)
INTERNAL:
Return whether the type is appropriate for the indirection policy.
|
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.
|
void |
validateDeclaredAttributeType(Class attributeType,
IntegrityChecker checker)
INTERNAL:
Verify that attributeType is correct for the
indirection policy.
|
void |
validateGetMethodReturnType(Class returnType,
IntegrityChecker checker)
INTERNAL:
Verify that getter returnType is correct for the
indirection policy.
|
void |
validateSetMethodParameterType(Class parameterType,
IntegrityChecker checker)
INTERNAL:
Verify that setter parameterType is correct for the
indirection policy.
|
Object |
valueFromQuery(ReadQuery query,
AbstractRecord row,
AbstractSession session)
INTERNAL:
Return the value to be stored in the object's attribute.
|
Object |
valueFromRow(Object object)
INTERNAL:
Return the value to be stored in the object's attribute.
|
buildCascadeQuery, clone, getCollectionMapping, getForeignReferenceMapping, getMapping, getOneToOneMapping, getValueFromProxy, initialize, setMapping, usesIndirection, usesTransparentIndirection, validateContainerPolicy, validateDeclaredAttributeTypeForCollection, validateGetMethodReturnTypeForCollection, validateSetMethodParameterTypeForCollection
public BasicIndirectionPolicy()
public Object backupCloneAttribute(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork)
backupCloneAttribute
in class IndirectionPolicy
public Object cloneAttribute(Object attributeValue, Object original, Object clone, UnitOfWorkImpl unitOfWork, boolean buildDirectlyFromRow)
cloneAttribute
in class IndirectionPolicy
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 Vector extractPrimaryKeyForReferenceObject(Object referenceObject, AbstractSession session)
extractPrimaryKeyForReferenceObject
in class IndirectionPolicy
public AbstractRecord extractReferenceRow(Object referenceObject)
extractReferenceRow
in class IndirectionPolicy
public Object getOriginalIndirectionObject(Object unitOfWorkIndirectionObject, AbstractSession session)
getOriginalIndirectionObject
in class IndirectionPolicy
public Object getRealAttributeValueFromObject(Object object, Object attribute)
getRealAttributeValueFromObject
in class IndirectionPolicy
public void iterateOnAttributeValue(DescriptorIterator iterator, Object attributeValue)
iterateOnAttributeValue
in class IndirectionPolicy
public Object nullValueFromRow()
nullValueFromRow
in class IndirectionPolicy
public boolean objectIsInstantiated(Object object)
objectIsInstantiated
in class IndirectionPolicy
public void setRealAttributeValueInObject(Object target, Object attributeValue)
setRealAttributeValueInObject
in class IndirectionPolicy
protected boolean typeIsValid(Class attributeType)
public Object validateAttributeOfInstantiatedObject(Object attributeValue)
validateAttributeOfInstantiatedObject
in class IndirectionPolicy
public void validateDeclaredAttributeType(Class attributeType, IntegrityChecker checker) throws DescriptorException
validateDeclaredAttributeType
in class IndirectionPolicy
DescriptorException
public void validateGetMethodReturnType(Class returnType, IntegrityChecker checker) throws DescriptorException
validateGetMethodReturnType
in class IndirectionPolicy
DescriptorException
public void validateSetMethodParameterType(Class parameterType, IntegrityChecker checker) throws DescriptorException
validateSetMethodParameterType
in class IndirectionPolicy
DescriptorException
public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session)
valueFromQuery
in class IndirectionPolicy
public Object valueFromRow(Object object)
valueFromRow
in class IndirectionPolicy
Copyright © 2021. All rights reserved.