public abstract class DatabaseMapping extends Object implements Cloneable, Serializable
Purpose: Defines how an attribute of an object maps to and from the database
Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected AttributeAccessor |
attributeAccessor
Wrapper to store the reference objects.
|
protected ClassDescriptor |
descriptor
Descriptor to which this mapping belongs to
|
protected Vector<DatabaseField> |
fields
Fields associated with the mappings are cached
|
protected boolean |
isOptional
Specifies whether this mapping is optional (i.e.
|
protected boolean |
isReadOnly
Makes this mapping read only.
|
protected boolean |
isRemotelyInitialized
It is needed only in remote initialization and mapping is in parent descriptor
|
protected static Vector |
NO_FIELDS
Used to reduce memory for mappings with no fields.
|
protected static Integer |
NO_WEIGHT
Used to share integer instance to reduce memory.
|
protected boolean |
primaryKeyMapping
used as a quick check to see if this mapping is a primary key mapping,
set by the object builder during initialization.
|
protected Map |
properties
used as a temporary store for custom SDK usage
|
protected Integer |
weight
This is a TopLink defined attribute that allows us to sort the mappings
|
protected static Integer |
WEIGHT_1 |
Constructor and Description |
---|
DatabaseMapping()
PUBLIC:
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addToCollectionChangeRecord(Object newKey,
Object newValue,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow)
INTERNAL:
Add a new value and its change set to the collection change record.
|
abstract void |
buildBackupClone(Object clone,
Object backup,
UnitOfWorkImpl unitOfWork)
INTERNAL:
Clone the attribute from the clone and assign it to the backup.
|
Object |
buildBackupCloneForPartObject(Object attributeValue,
Object clone,
Object backup,
UnitOfWorkImpl unitOfWork)
INTERNAL:
Require for cloning, the part must be cloned.
|
ChangeRecord |
buildChangeRecord(Object newValue,
ObjectChangeSet owner,
AbstractSession session)
INTERNAL:
Directly build a change record without comparison
|
abstract void |
buildClone(Object original,
Object clone,
UnitOfWorkImpl unitOfWork,
JoinedAttributeManager joinedAttributeManager)
INTERNAL:
Clone the attribute from the original and assign it to the clone.
|
Object |
buildCloneForPartObject(Object attributeValue,
Object original,
Object clone,
UnitOfWorkImpl unitOfWork,
boolean isExisting)
INTERNAL:
Require for cloning, the part must be cloned.
|
abstract void |
buildCloneFromRow(AbstractRecord databaseRow,
JoinedAttributeManager joinManager,
Object clone,
ObjectBuildingQuery sourceQuery,
UnitOfWorkImpl unitOfWork,
AbstractSession executionSession)
INTERNAL:
A combination of readFromRowIntoObject and buildClone.
|
void |
buildCopy(Object copy,
Object original,
ObjectCopyingPolicy policy)
INTERNAL:
Copy of the attribute of the object.
|
Expression |
buildObjectJoinExpression(Expression base,
Expression argument,
AbstractSession session)
INTERNAL:
Used to allow object level comparisons.
|
Expression |
buildObjectJoinExpression(Expression base,
Object value,
AbstractSession session)
INTERNAL:
Used to allow object level comparisons.
|
void |
buildShallowOriginalFromRow(AbstractRecord databaseRow,
Object original,
ObjectBuildingQuery query,
AbstractSession executionSession)
INTERNAL:
Builds a shallow original object.
|
void |
calculateDeferredChanges(ChangeRecord changeRecord,
AbstractSession session)
INTERNAL:
Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes
as apposed to detected changes.
|
void |
cascadeMerge(Object sourceElement,
MergeManager mergeManager)
INTERNAL:
Cascade the merge to the component object, if appropriate.
|
abstract void |
cascadePerformRemoveIfRequired(Object object,
UnitOfWorkImpl uow,
IdentityHashtable visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
abstract void |
cascadeRegisterNewIfRequired(Object object,
UnitOfWorkImpl uow,
IdentityHashtable visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
Object |
clone()
INTERNAL:
Clones itself.
|
protected Vector |
cloneFields(Vector fields)
INTERNAL:
Helper method to clone vector of fields (used in aggregate initialization cloning).
|
protected Vector<DatabaseField> |
collectFields()
This method must be overwritten in the subclasses to return a vector of all the
fields this mapping represents.
|
abstract ChangeRecord |
compareForChange(Object clone,
Object backup,
ObjectChangeSet owner,
AbstractSession session)
INTERNAL:
This method was created in VisualAge.
|
abstract boolean |
compareObjects(Object firstObject,
Object secondObject,
AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings
This method is implemented by subclasses as necessary.
|
UnitOfWorkValueHolder |
createUnitOfWorkValueHolder(ValueHolderInterface attributeValue,
Object original,
Object clone,
AbstractRecord row,
UnitOfWorkImpl unitOfWork,
boolean buildDirectlyFromRow)
INTERNAL:
Builder the unit of work value holder.
|
protected Vector |
extractNestedExpressions(List expressions,
ExpressionBuilder newRoot,
boolean rootExpressionsAllowed)
INTERNAL:
Extract the nested attribute expressions that apply to this mapping.
|
AttributeAccessor |
getAttributeAccessor()
ADVANCED:
Return the attributeAccessor.
|
Class |
getAttributeClassification()
PUBLIC:
The classification type for the attribute this mapping represents
|
String |
getAttributeName()
PUBLIC:
Return the name of the attribute set in the mapping.
|
Object |
getAttributeValueFromObject(Object object)
INTERNAL:
Return the value of an attribute which this mapping represents for an object.
|
ContainerPolicy |
getContainerPolicy()
INTERNAL:
Return the mapping's containerPolicy.
|
ClassDescriptor |
getDescriptor()
INTERNAL:
Return the descriptor to which this mapping belongs
|
DatabaseField |
getField()
INTERNAL:
Return the field associated with this mapping if there is exactly one.
|
Class |
getFieldClassification(DatabaseField fieldToClassify)
INTERNAL:
Return the classifiction for the field contained in the mapping.
|
Vector<DatabaseField> |
getFields()
INTERNAL:
Returns a vector of all the fields this mapping represents.
|
String |
getGetMethodName()
PUBLIC:
This method is invoked reflectively on the reference object to return the value of the
attribute in the object.
|
Map |
getProperties()
INTERNAL:
used as a temporary store for custom SDK usage
|
Object |
getProperty(Object property)
INTERNAL:
used as a temporary store for custom SDK usage
|
Object |
getRealAttributeValueFromObject(Object object,
AbstractSession session)
INTERNAL:
Return the value of an attribute unwrapping value holders if required.
|
Object |
getRealCollectionAttributeValueFromObject(Object object,
AbstractSession session)
INTERNAL:
Return the value of an attribute, unwrapping value holders if necessary.
|
ClassDescriptor |
getReferenceClassDescriptor()
PUBLIC:
Return the referenceDescriptor.
|
ClassDescriptor |
getReferenceDescriptor()
INTERNAL:
Return the referenceDescriptor.
|
DatabaseMapping |
getRelationshipPartner()
INTERNAL:
Return the relationshipPartner mapping for this bi-directional mapping.
|
String |
getSetMethodName()
PUBLIC:
This method is invoked reflectively on the reference object to set the value of the
attribute in the object.
|
Integer |
getWeight()
INTERNAL:
Return the weight of the mapping, used to sort mappings to ensure that
DirectToField Mappings get merged first
|
boolean |
hasConstraintDependency()
INTERNAL:
The returns if the mapping has any constraint dependencies, such as foreign keys and join tables.
|
boolean |
hasDependency()
INTERNAL:
Return if the mapping has any ownership or other dependency over its target object(s).
|
boolean |
hasInverseConstraintDependency()
INTERNAL:
The returns if the mapping has any inverse constraint dependencies, such as foreign keys and join tables.
|
void |
initialize(AbstractSession session)
INTERNAL:
Allow for initialization of properties and validation.
|
boolean |
isAbstractCompositeCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isAbstractCompositeDirectCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isAbstractCompositeObjectMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isAbstractDirectMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isAggregateCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isAggregateMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isAggregateObjectMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isCascadedLockingSupported()
INTERNAL:
Used when determining if a mapping supports cascaded version optimistic
locking.
|
boolean |
isChangeTrackingSupported()
INTERNAL:
Return if this mapping supports change tracking.
|
boolean |
isCloningRequired()
INTERNAL:
Return if this mapping requires its attribute value to be cloned.
|
boolean |
isCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isDatabaseMapping()
INTERNAL:
|
boolean |
isDirectCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isDirectMapMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isDirectToFieldMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isDirectToXMLTypeMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isEISMapping()
INTERNAL:
All EIS mappings should implement this method to return true.
|
boolean |
isForeignReferenceMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isJoiningSupported()
INTERNAL:
Return if this mapping support joining.
|
boolean |
isManyToManyMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isNestedTableMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isObjectReferenceMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isObjectTypeMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isOneToManyMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isOneToOneMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isOptional()
INTERNAL:
Return whether the value of this mapping is optional (that is, can be
null).
|
boolean |
isPrimaryKeyMapping()
INTERNAL:
Set by the Object builder during initialization returns true if this mapping
is used as a primary key mapping.
|
boolean |
isPrivateOwned()
INTERNAL:
Return if the mapping has ownership over its target object(s).
|
boolean |
isReadOnly()
INTERNAL:
Returns true if mapping is read only else false.
|
boolean |
isReferenceMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isRelationalMapping()
INTERNAL:
All relational mappings should implement this method to return true.
|
protected boolean |
isRemotelyInitialized() |
boolean |
isSerializedObjectMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isStructureMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isTransformationMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isTypeConversionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isUsingMethodAccess()
PUBLIC:
Return if method access is used.
|
boolean |
isVariableOneToOneMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
isWriteOnly()
INTERNAL:
Some mappings support no attribute (transformation).
|
boolean |
isXMLMapping()
INTERNAL:
All relational mappings should implement this method to return true.
|
abstract void |
iterate(DescriptorIterator iterator)
INTERNAL:
Iterate on the appropriate attribute value.
|
void |
iterateOnRealAttributeValue(DescriptorIterator iterator,
Object realAttributeValue)
INTERNAL:
Iterate on the attribute value.
|
abstract void |
mergeChangesIntoObject(Object target,
ChangeRecord changeRecord,
Object source,
MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
abstract void |
mergeIntoObject(Object target,
boolean isTargetUninitialized,
Object source,
MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
void |
performDataModificationEvent(Object[] event,
AbstractSession session)
INTERNAL:
Perform the commit event.
|
void |
postDelete(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
postInitialize(AbstractSession session)
INTERNAL:
Allow for initialization of properties and validation that have dependecies no the descriptor
being initialized.
|
void |
postInsert(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
postUpdate(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
preDelete(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
preInitialize(AbstractSession session)
INTERNAL:
Allow for initialization of properties and validation.
|
void |
preInsert(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
prepareCascadeLockingPolicy()
INTERNAL:
A subclass that supports cascade version optimistic locking should
implement this method to properly prepare the locking policy for their
mapping type.
|
void |
preUpdate(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
Object |
readFromRowIntoObject(AbstractRecord databaseRow,
JoinedAttributeManager joinManager,
Object targetObject,
ObjectBuildingQuery sourceQuery)
INTERNAL:
Extract value from the row and set the attribute to this value in the object.
|
Object |
readFromRowIntoObject(AbstractRecord databaseRow,
JoinedAttributeManager joinManager,
Object targetObject,
ObjectBuildingQuery sourceQuery,
AbstractSession executionSession)
INTERNAL:
Extract value from the row and set the attribute to this value in the object.
|
void |
readOnly()
PUBLIC:
To make mapping read only.
|
void |
readWrite()
PUBLIC:
The mapping can be dynamically made either readOnly or readWriteOnly.
|
void |
rehashFieldDependancies(AbstractSession session)
INTERNAL:
Rehash any hashtables based on fields.
|
void |
removeFromCollectionChangeRecord(Object newKey,
Object newValue,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow)
INTERNAL:
Remove a value and its change set from the collection change record.
|
void |
setAttributeAccessor(AttributeAccessor attributeAccessor)
ADVANCED:
Set the attributeAccessor.
|
void |
setAttributeName(String attributeName)
PUBLIC:
Sets the name of the attribute in the mapping.
|
void |
setAttributeValueInObject(Object object,
Object value)
INTERNAL:
Set the value of the attribute mapped by this mapping.
|
void |
setDescriptor(ClassDescriptor descriptor)
INTERNAL:
Set the descriptor to which this mapping belongs
|
protected void |
setFields(Vector<DatabaseField> fields)
INTERNAL:
Set the mapping's field collection.
|
void |
setGetMethodName(String methodName)
PUBLIC:
This method is invoked reflectively on the reference object to return the value of the
attribute in the object.
|
void |
setIsOptional(boolean isOptional)
INTERNAL:
Used to specify whether the value of this mapping may be null.
|
void |
setIsPrimaryKeyMapping(boolean pkMapping)
INTERNAL:
Set by the Object builder during initialization returns true if this mapping
is used as a primary key mapping.
|
void |
setIsReadOnly(boolean aBoolean)
PUBLIC:
Set this mapping to be read only.
|
void |
setProperties(Map properties)
INTERNAL:
used as a temporary store for custom SDK usage
|
void |
setProperty(Object property,
Object value)
ADVANCED:
Allow user defined properties.
|
void |
setRealAttributeValueInObject(Object object,
Object value)
INTERNAL:
Set the value of the attribute mapped by this mapping,
placing it inside a value holder if necessary.
|
void |
setSetMethodName(String methodName)
PUBLIC:
This method is invoked reflectively on the reference object to get the value of the attribute.
|
void |
setWeight(Integer newWeight)
ADVANCED:
Set the weight of the mapping, used to sort mappings
DirectToField Mappings have a default weight of 1 while all other Mappings have a
default weight of MAXINT.
|
void |
simpleAddToCollectionChangeRecord(Object referenceKey,
Object changeSetToAdd,
ObjectChangeSet changeSet,
AbstractSession session)
ADVANCED:
This method is used to add an object to a collection once the changeSet is applied.
|
void |
simpleRemoveFromCollectionChangeRecord(Object referenceKey,
Object changeSetToAdd,
ObjectChangeSet changeSet,
AbstractSession session)
ADVANCED:
This method is used to remove an object from a collection once the changeSet is applied.
|
String |
toString()
INTERNAL:
Print the mapping attribute name, this is used in error messages.
|
void |
updateChangeRecord(Object clone,
Object newValue,
Object oldValue,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow)
INTERNAL:
Either create a new change record or update the change record with the new value.
|
void |
validateAfterInitialization(AbstractSession session)
INTERNAL:
Allow for subclasses to perform validation.
|
void |
validateBeforeInitialization(AbstractSession session)
INTERNAL:
Allow for subclasses to perform validation.
|
Object |
valueFromObject(Object anObject,
DatabaseField field,
AbstractSession session)
INTERNAL:
A subclass should extract the value from the object for the field, if it does not map the field then
it should return null.
|
Object |
valueFromRow(AbstractRecord row,
JoinedAttributeManager joinManager,
ObjectBuildingQuery query)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
Object |
valueFromRow(AbstractRecord row,
JoinedAttributeManager joinManager,
ObjectBuildingQuery query,
AbstractSession session)
INTERNAL:
|
boolean |
verifyDelete(Object object,
AbstractSession session)
INTERNAL:
To verify if the specified object has been deleted or not.
|
void |
writeFromAttributeIntoRow(Object attribute,
AbstractRecord row,
AbstractSession session)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
writeFromObjectIntoRow(Object object,
AbstractRecord row,
AbstractSession session)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
writeFromObjectIntoRowForShallowDelete(Object object,
AbstractRecord row,
AbstractSession session)
INTERNAL:
This row is built for shallow delete which happens in case of circular dependencies for bidirectional deletes.
|
void |
writeFromObjectIntoRowForShallowInsert(Object object,
AbstractRecord row,
AbstractSession session)
INTERNAL:
This row is built for shallow insert which happens in case of of circular dependencies bidirectional inserts.
|
void |
writeFromObjectIntoRowForShallowInsertWithChangeRecord(ChangeRecord changeRecord,
AbstractRecord row,
AbstractSession session)
INTERNAL:
This row is built for shallow insert which happens in case of bidirectional inserts.
|
void |
writeFromObjectIntoRowForUpdate(WriteObjectQuery query,
AbstractRecord row)
INTERNAL:
Write the attribute value from the object to the row for update.
|
void |
writeFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query,
AbstractRecord row)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord,
AbstractRecord row,
AbstractSession session)
INTERNAL:
A subclass should implement this method if it wants different behaviour.
|
void |
writeInsertFieldsIntoRow(AbstractRecord databaseRow,
AbstractSession session)
INTERNAL:
Write fields needed for insert into the template for with null values.
|
void |
writeUpdateFieldsIntoRow(AbstractRecord databaseRow,
AbstractSession session)
INTERNAL:
Write fields needed for update into the template for with null values.
|
protected static Vector NO_FIELDS
protected static Integer NO_WEIGHT
protected static Integer WEIGHT_1
protected ClassDescriptor descriptor
protected AttributeAccessor attributeAccessor
protected boolean isReadOnly
protected boolean isOptional
protected Vector<DatabaseField> fields
protected boolean isRemotelyInitialized
protected Integer weight
protected Map properties
protected boolean primaryKeyMapping
public abstract void buildBackupClone(Object clone, Object backup, UnitOfWorkImpl unitOfWork)
public Object buildBackupCloneForPartObject(Object attributeValue, Object clone, Object backup, UnitOfWorkImpl unitOfWork)
public abstract void buildClone(Object original, Object clone, UnitOfWorkImpl unitOfWork, JoinedAttributeManager joinedAttributeManager)
public abstract void buildCloneFromRow(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object clone, ObjectBuildingQuery sourceQuery, UnitOfWorkImpl unitOfWork, AbstractSession executionSession)
buildClone assumes the attribute value exists on the original and can simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
public void buildShallowOriginalFromRow(AbstractRecord databaseRow, Object original, ObjectBuildingQuery query, AbstractSession executionSession)
public Object buildCloneForPartObject(Object attributeValue, Object original, Object clone, UnitOfWorkImpl unitOfWork, boolean isExisting)
public void buildCopy(Object copy, Object original, ObjectCopyingPolicy policy)
public Expression buildObjectJoinExpression(Expression base, Object value, AbstractSession session)
public Expression buildObjectJoinExpression(Expression base, Expression argument, AbstractSession session)
public abstract void cascadePerformRemoveIfRequired(Object object, UnitOfWorkImpl uow, IdentityHashtable visitedObjects)
public abstract void cascadeRegisterNewIfRequired(Object object, UnitOfWorkImpl uow, IdentityHashtable visitedObjects)
public void calculateDeferredChanges(ChangeRecord changeRecord, AbstractSession session)
public void cascadeMerge(Object sourceElement, MergeManager mergeManager)
protected Vector cloneFields(Vector fields)
protected Vector<DatabaseField> collectFields()
public abstract ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session)
public abstract boolean compareObjects(Object firstObject, Object secondObject, AbstractSession session)
public void convertClassNamesToClasses(ClassLoader classLoader)
classLoader
- public UnitOfWorkValueHolder createUnitOfWorkValueHolder(ValueHolderInterface attributeValue, Object original, Object clone, AbstractRecord row, UnitOfWorkImpl unitOfWork, boolean buildDirectlyFromRow)
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.protected Vector extractNestedExpressions(List expressions, ExpressionBuilder newRoot, boolean rootExpressionsAllowed)
rootExpressionsAllowed
- true if newRoot itself can be one of the
expressions returnedpublic AttributeAccessor getAttributeAccessor()
public Class getAttributeClassification()
public String getAttributeName()
public Object getAttributeValueFromObject(Object object) throws DescriptorException
DescriptorException
public ContainerPolicy getContainerPolicy()
public ClassDescriptor getDescriptor()
public DatabaseField getField()
public Class getFieldClassification(DatabaseField fieldToClassify)
public Vector<DatabaseField> getFields()
public String getGetMethodName()
public Map getProperties()
public Object getProperty(Object property)
public Object getRealAttributeValueFromObject(Object object, AbstractSession session) throws DescriptorException
DescriptorException
public Object getRealCollectionAttributeValueFromObject(Object object, AbstractSession session) throws DescriptorException
DescriptorException
public ClassDescriptor getReferenceDescriptor()
getReferenceClassDescriptor()
public ClassDescriptor getReferenceClassDescriptor()
public DatabaseMapping getRelationshipPartner()
public String getSetMethodName()
public Integer getWeight()
public boolean hasConstraintDependency()
public boolean isUsingMethodAccess()
public boolean hasDependency()
public boolean hasInverseConstraintDependency()
public void initialize(AbstractSession session) throws DescriptorException
DescriptorException
public boolean isAggregateCollectionMapping()
public boolean isAggregateMapping()
public boolean isAggregateObjectMapping()
public boolean isCollectionMapping()
public boolean isDatabaseMapping()
public boolean isDirectCollectionMapping()
public boolean isDirectMapMapping()
public boolean isDirectToFieldMapping()
public boolean isForeignReferenceMapping()
public boolean isManyToManyMapping()
public boolean isNestedTableMapping()
public boolean isObjectReferenceMapping()
public boolean isObjectTypeMapping()
public boolean isOneToManyMapping()
public boolean isOneToOneMapping()
public boolean isOptional()
public boolean isEISMapping()
public boolean isRelationalMapping()
public boolean isXMLMapping()
public boolean isAbstractDirectMapping()
public boolean isAbstractCompositeDirectCollectionMapping()
public boolean isAbstractCompositeObjectMapping()
public boolean isAbstractCompositeCollectionMapping()
public boolean isJoiningSupported()
public boolean isCloningRequired()
public boolean isPrimaryKeyMapping()
public boolean isCascadedLockingSupported()
public boolean isChangeTrackingSupported()
public boolean isPrivateOwned()
public boolean isReadOnly()
public boolean isReferenceMapping()
protected boolean isRemotelyInitialized()
public boolean isSerializedObjectMapping()
public boolean isStructureMapping()
public boolean isTransformationMapping()
public boolean isTypeConversionMapping()
public boolean isVariableOneToOneMapping()
public boolean isDirectToXMLTypeMapping()
public boolean isWriteOnly()
public abstract void iterate(DescriptorIterator iterator)
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue)
public abstract void mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager)
public abstract void mergeIntoObject(Object target, boolean isTargetUninitialized, Object source, MergeManager mergeManager)
public void performDataModificationEvent(Object[] event, AbstractSession session) throws DatabaseException, DescriptorException
DatabaseException
DescriptorException
public void postDelete(WriteObjectQuery query) throws DatabaseException
DatabaseException
public void postInitialize(AbstractSession session) throws DescriptorException
DescriptorException
public void postInsert(WriteObjectQuery query) throws DatabaseException
DatabaseException
public void postUpdate(WriteObjectQuery query) throws DatabaseException
DatabaseException
public void preDelete(WriteObjectQuery query) throws DatabaseException
DatabaseException
public void preInitialize(AbstractSession session) throws DescriptorException
DescriptorException
public void preInsert(WriteObjectQuery query) throws DatabaseException
DatabaseException
public void prepareCascadeLockingPolicy()
public void preUpdate(WriteObjectQuery query) throws DatabaseException
DatabaseException
public Object readFromRowIntoObject(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object targetObject, ObjectBuildingQuery sourceQuery) throws DatabaseException
DatabaseException
public Object readFromRowIntoObject(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object targetObject, ObjectBuildingQuery sourceQuery, AbstractSession executionSession) throws DatabaseException
DatabaseException
public void readOnly()
public void readWrite()
public void rehashFieldDependancies(AbstractSession session)
public void setAttributeAccessor(AttributeAccessor attributeAccessor)
public void setAttributeName(String attributeName)
public void setAttributeValueInObject(Object object, Object value) throws DescriptorException
DescriptorException
public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException
DescriptorException
public void setDescriptor(ClassDescriptor descriptor)
protected void setFields(Vector<DatabaseField> fields)
public void setGetMethodName(String methodName)
public void setIsOptional(boolean isOptional)
public void setIsPrimaryKeyMapping(boolean pkMapping)
public void setIsReadOnly(boolean aBoolean)
public void setProperties(Map properties)
public void setProperty(Object property, Object value)
public void setSetMethodName(String methodName)
public void setWeight(Integer newWeight)
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) throws DescriptorException
DescriptorException
public void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) throws DescriptorException
DescriptorException
public String toString()
public void validateAfterInitialization(AbstractSession session) throws DescriptorException
DescriptorException
public void validateBeforeInitialization(AbstractSession session) throws DescriptorException
DescriptorException
public Object valueFromObject(Object anObject, DatabaseField field, AbstractSession session)
public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query) throws DatabaseException
DatabaseException
public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, AbstractSession session) throws DatabaseException
DatabaseException
public boolean verifyDelete(Object object, AbstractSession session) throws DatabaseException
DatabaseException
public void writeFromAttributeIntoRow(Object attribute, AbstractRecord row, AbstractSession session)
public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session)
public void writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord row, AbstractSession session)
public void writeFromObjectIntoRowForShallowDelete(Object object, AbstractRecord row, AbstractSession session)
public void writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session)
public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session)
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery query, AbstractRecord row)
public void writeFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query, AbstractRecord row)
public void writeInsertFieldsIntoRow(AbstractRecord databaseRow, AbstractSession session)
public void writeUpdateFieldsIntoRow(AbstractRecord databaseRow, AbstractSession session)
public void updateChangeRecord(Object clone, Object newValue, Object oldValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow) throws DescriptorException
DescriptorException
public void addToCollectionChangeRecord(Object newKey, Object newValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow) throws DescriptorException
DescriptorException
public void removeFromCollectionChangeRecord(Object newKey, Object newValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow) throws DescriptorException
DescriptorException
public ChangeRecord buildChangeRecord(Object newValue, ObjectChangeSet owner, AbstractSession session) throws DescriptorException
DescriptorException
Copyright © 2021. All rights reserved.