EclipseLink 2.1.2, build 'v20101206-r8635' API Reference

org.eclipse.persistence.mappings
Class DatabaseMapping

java.lang.Object
  extended by org.eclipse.persistence.mappings.DatabaseMapping
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractCompositeDirectCollectionMapping, AbstractDirectMapping, AbstractTransformationMapping, AggregateMapping, ForeignReferenceMapping, XMLAbstractAnyMapping, XMLAnyAttributeMapping, XMLChoiceCollectionMapping, XMLChoiceObjectMapping

public abstract class DatabaseMapping
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Purpose: Defines how an attribute of an object maps to and from the database

Responsibilities:

See Also:
Serialized Form
Author:
Sati
Since:
TOPLink/Java 1.0

Nested Class Summary
static class DatabaseMapping.WriteType
           
 
Field Summary
protected  AttributeAccessor attributeAccessor
          Wrapper to store the reference objects.
protected  java.lang.String attributeName
          PERF: Cache the mappings attribute name.
protected  DatabaseMapping derivedIdMapping
          The id mapping this mapping derives.
protected  boolean derivesId
          Used by the CMP3Policy to see if this mapping should be used in processing pk classes for find methods
protected  ClassDescriptor descriptor
          ClassDescriptor to which this mapping belongs to
protected  java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields
          Fields associated with the mappings are cached
protected  boolean isJPAId
           
protected  java.lang.Boolean isLazy
          Specifies whether this mapping is lazy, this means not included in the default fetch group.
protected  boolean isMapKeyMapping
          Records if this mapping is being used as a MapKeyMapping.
protected  boolean isOptional
          Specifies whether this mapping is optional (i.e. field may be null).
protected  boolean isPrimaryKeyMapping
          PERF: Used as a quick check to see if this mapping is a primary key mapping, set by the object builder during initialization.
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  java.lang.String mapsIdValue
          A mapsId value.
protected static java.util.Vector NO_FIELDS
          Used to reduce memory for mappings with no fields.
protected static java.lang.Integer NO_WEIGHT
          Used to share integer instance to reduce memory.
protected  java.util.Map properties
          Allow user defined properties.
protected  java.lang.Integer weight
          This is a TopLink defined attribute that allows us to sort the mappings
protected static java.lang.Integer WEIGHT_1
           
 
Constructor Summary
DatabaseMapping()
          PUBLIC: Default constructor.
 
Method Summary
abstract  void buildBackupClone(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
          INTERNAL: Clone the attribute from the clone and assign it to the backup.
 java.lang.Object buildBackupCloneForPartObject(java.lang.Object attributeValue, java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
          INTERNAL: Require for cloning, the part must be cloned.
 org.eclipse.persistence.internal.sessions.ChangeRecord buildChangeRecord(java.lang.Object newValue, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Directly build a change record without comparison
abstract  void buildClone(java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
          INTERNAL: Clone the attribute from the original and assign it to the clone.
 java.lang.Object buildCloneForPartObject(java.lang.Object attributeValue, java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, boolean isExisting)
          INTERNAL: Require for cloning, the part must be cloned.
abstract  void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object clone, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
          INTERNAL: A combination of readFromRowIntoObject and buildClone.
 void buildCopy(java.lang.Object copy, java.lang.Object original, CopyGroup group)
          INTERNAL: Copy of the attribute of the object.
 Expression buildExpression(java.lang.Object queryObject, QueryByExamplePolicy policy, Expression expressionBuilder, java.util.Map processedObjects, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: In case Query By Example is used, this method builds and returns an expression that corresponds to a single attribue and it's value.
 Expression buildObjectJoinExpression(Expression base, Expression argument, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Used to allow object level comparisons.
 Expression buildObjectJoinExpression(Expression base, java.lang.Object value, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Used to allow object level comparisons.
 void buildShallowOriginalFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object original, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
          INTERNAL: Builds a shallow original object.
 void calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes as apposed to detected changes.
 void cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object, java.util.Map newObjects, java.util.Map unregisteredExistingObjects, java.util.Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Cascade discover and persist new objects during commit.
 void cascadeMerge(java.lang.Object sourceElement, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
          INTERNAL: Cascade the merge to the component object, if appropriate.
abstract  void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
          INTERNAL: Cascade registerNew for Create through mappings that require the cascade
 void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
          INTERNAL: Cascade removal of orphaned private owned objects from the UnitOfWorkChangeSet
abstract  void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
          INTERNAL: Cascade registerNew for Create through mappings that require the cascade
 java.lang.Object clone()
          INTERNAL: Clones itself.
protected  java.util.Vector cloneFields(java.util.Vector fields)
          INTERNAL: Helper method to clone vector of fields (used in aggregate initialization cloning).
protected  java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> collectFields()
          This method must be overwritten in the subclasses to return a vector of all the fields this mapping represents.
abstract  org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: This method was created in VisualAge.
abstract  boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Compare the attributes belonging to this mapping for the objects.
 void convertClassNamesToClasses(java.lang.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.
 org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder createUnitOfWorkValueHolder(ValueHolderInterface attributeValue, java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, boolean buildDirectlyFromRow)
          INTERNAL: Builder the unit of work value holder.
 boolean derivesId()
          ADVANCED: Returns true if the mapping references a JPA ID attribute for the CMP3Policy and JPA ID classes.
 void earlyPreDelete(DeleteObjectQuery query)
          INTERNAL: This method is called to update collection tables prior to commit.
protected  java.util.List<Expression> extractNestedExpressions(java.util.List<Expression> expressions, ExpressionBuilder newRoot, boolean rootExpressionsAllowed)
          INTERNAL: Extract the nested attribute expressions that apply to this mapping.
abstract  void fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, RemoteSession session)
          INTERNAL: An object has been serialized from the server to the client.
 void fixRealObjectReferences(java.lang.Object object, java.util.Map objectInformation, java.util.Map processedObjects, ObjectLevelReadQuery query, RemoteSession session)
          INTERNAL: At this point, we realize we don't have indirection; so we need to replace the reference object(s) with the corresponding object(s) from the remote session.
 AttributeAccessor getAttributeAccessor()
          ADVANCED: Return the attributeAccessor.
 java.lang.Class getAttributeClassification()
          PUBLIC: The classification type for the attribute this mapping represents
 java.lang.String getAttributeName()
          PUBLIC: Return the name of the attribute set in the mapping.
 java.lang.Object getAttributeValueFromObject(java.lang.Object object)
          INTERNAL: Return the value of an attribute which this mapping represents for an object.
 org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
          INTERNAL: Return the mapping's containerPolicy.
 DatabaseMapping getDerivedIdMapping()
          ADVANCED: Set the maps id value
 ClassDescriptor getDescriptor()
          INTERNAL: Return the descriptor to which this mapping belongs
 org.eclipse.persistence.internal.helper.DatabaseField getField()
          INTERNAL: Return the field associated with this mapping if there is exactly one.
 java.lang.Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
          INTERNAL: Return the classification for the field contained in the mapping.
 java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getFields()
          INTERNAL: Returns a vector of all the fields this mapping represents.
 java.lang.String getGetMethodName()
          PUBLIC: This method is invoked reflectively on the reference object to return the value of the attribute in the object.
 java.lang.String getMapsIdValue()
          ADVANCED: Set the mapped by id value
 java.lang.Object getObjectCorrespondingTo(java.lang.Object object, RemoteSession session, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query)
          INTERNAL: return the object on the client corresponding to the specified object.
 java.util.Map getProperties()
          INTERNAL: used as a temporary store for custom SDK usage
 java.lang.Object getProperty(java.lang.Object property)
          ADVANCED: Allow user defined properties.
 java.lang.Object getRealAttributeValueFromAttribute(java.lang.Object attributeValue, java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Return the value of an attribute unwrapping value holders if required.
 java.lang.Object getRealAttributeValueFromObject(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Return the value of an attribute unwrapping value holders if required.
 java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Return the value of an attribute, unwrapping value holders if necessary.
 ClassDescriptor getReferenceDescriptor()
          PUBLIC: Return the referenceDescriptor.
 DatabaseMapping getRelationshipPartner()
          INTERNAL: Return the relationshipPartner mapping for this bi-directional mapping.
 java.util.Vector getSelectFields()
          INTERNAL: Returns the set of fields that should be selected to build this mapping's value(s).
 java.util.Vector getSelectTables()
          INTERNAL: Returns the table(s) that should be selected to build this mapping's value(s).
 java.lang.String getSetMethodName()
          PUBLIC: This method is invoked reflectively on the reference object to set the value of the attribute in the object.
 java.lang.Object getValueFromRemoteValueHolder(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
          INTERNAL: extract and return the appropriate value from the specified remote value holder
 java.lang.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.
 boolean hasMapsIdValue()
          ADVANCED: Set the mapped by id value
protected  boolean hasRootExpressionThatShouldUseOuterJoin(java.util.List expressions)
          INTERNAL: If there is root expression in the list then indicates whether it shouldUseOuterJoin, otherwise return false.
 void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Allow for initialization of properties and validation.
 void instantiateAttribute(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Trigger the instantiation of the attribute if lazy.
 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 isCandidateForPrivateOwnedRemoval()
          INTERNAL: Returns true if the mapping should be added to the UnitOfWork's list of private owned objects for private owned orphan removal.
 boolean isCascadedLockingSupported()
          INTERNAL: Used when determining if a mapping supports cascaded version optimistic locking.
 boolean isChangeTrackingSupported(Project project)
          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 isJPAId()
          INTERNAL: Flags that this mapping is part of a JPA id mapping.
 boolean isLazy()
          Return if this mapping is lazy.
 boolean isLockableMapping()
          INTERNAL: Return whether this mapping should be traversed when we are locking
 boolean isManyToManyMapping()
          INTERNAL: Related mapping should implement this method to return true.
 boolean isManyToOneMapping()
          INTERNAL: Related mapping should implement this method to return true.
 boolean isMapKeyMapping()
           
 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 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()
          Return whether the value of this mapping is optional (that is, can be null).
 boolean isOwned()
          Returns true if this mapping is owned by the parent descriptor.
 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 isStructureMapping()
          INTERNAL: Related mapping should implement this method to return true.
 boolean isTransformationMapping()
          INTERNAL: Related mapping should implement this method to return true.
 boolean isUnidirectionalOneToManyMapping()
          INTERNAL:
 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(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
          INTERNAL: Iterate on the appropriate attribute value.
 void iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object realAttributeValue)
          INTERNAL: Iterate on the attribute value.
abstract  void mergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
          INTERNAL: Merge changes from the source to the target object.
abstract  void mergeIntoObject(java.lang.Object target, boolean isTargetUninitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
          INTERNAL: Merge changes from the source to the target object.
 void performDataModificationEvent(java.lang.Object[] event, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Perform the commit event.
 void postCalculateChanges(ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated.
 void postCalculateChangesOnDeleted(java.lang.Object deletedObject, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet uowChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.
 void postDelete(DeleteObjectQuery query)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void postInitialize(org.eclipse.persistence.internal.sessions.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 behavior.
 void postUpdate(WriteObjectQuery query)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void preDelete(DeleteObjectQuery query)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void preInitialize(org.eclipse.persistence.internal.sessions.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 behavior.
 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 behavior.
 java.lang.Object readFromResultSetIntoObject(java.sql.ResultSet resultSet, java.lang.Object targetObject, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor, java.sql.ResultSetMetaData metaData, int columnNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
          INTERNAL: Extract values directly from the result-set.
 java.lang.Object readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object targetObject, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.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 recordPrivateOwnedRemovals(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.
 void rehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Rehash any hashtables based on fields.
 void remoteInitialization(DistributedSession session)
          INTERNAL: Once descriptors are serialized to the remote session.
protected  void remotelyInitialized()
          Set the mapping to be initialized for the remote session.
 java.util.Map replaceValueHoldersIn(java.lang.Object object, org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
          INTERNAL: replace the value holders in the specified reference object(s)
 void setAttributeAccessor(AttributeAccessor attributeAccessor)
          ADVANCED: Set the attributeAccessor.
 void setAttributeName(java.lang.String attributeName)
          PUBLIC: Sets the name of the attribute in the mapping.
 void setAttributeValueInObject(java.lang.Object object, java.lang.Object value)
          INTERNAL: Set the value of the attribute mapped by this mapping.
 void setChangeListener(java.lang.Object clone, java.beans.PropertyChangeListener listener, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Set the change listener if required.
 void setDerivedIdMapping(DatabaseMapping derivedIdMapping)
          ADVANCED: Used to indicate the mapping references a JPA ID or MapsId attribute for the CMP3Policy and JPA Id classes (as well as Embeddable Id classes).
 void setDerivesId(boolean derivesId)
          ADVANCED: Used to indicate the mapping references a JPA ID or MapsId attribute for the CMP3Policy and JPA Id classes (as well as Embeddable Id classes).
 void setDescriptor(ClassDescriptor descriptor)
          INTERNAL: Set the descriptor to which this mapping belongs
protected  void setFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields)
          INTERNAL: Set the mapping's field collection.
 void setGetMethodName(java.lang.String methodName)
          PUBLIC: This method is invoked reflectively on the reference object to return the value of the attribute in the object.
 void setIsJPAId()
          INTERNAL: Flags that this mapping is part of a JPA id mapping.
 void setIsLazy(boolean isLazy)
          Set if this mapping is lazy.
 void setIsMapKeyMapping(boolean isMapKeyMapping)
           
 void setIsOptional(boolean isOptional)
          Used to specify whether the value of this mapping may be null.
 void setIsPrimaryKeyMapping(boolean isPrimaryKeyMapping)
          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 setMapsIdValue(java.lang.String mapsIdValue)
          ADVANCED: Set the maps id value
 void setProperties(java.util.Map properties)
          INTERNAL: Allow user defined properties.
 void setProperty(java.lang.Object property, java.lang.Object value)
          ADVANCED: Allow user defined properties.
 void setRealAttributeValueInObject(java.lang.Object object, java.lang.Object value)
          INTERNAL: Set the value of the attribute mapped by this mapping, placing it inside a value holder if necessary.
 void setSetMethodName(java.lang.String methodName)
          PUBLIC: Set the methodName used to set the value for the mapping's attribute into the object.
 void setWeight(java.lang.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(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
          ADVANCED: This method is used to add an object to a collection once the changeSet is applied.
 void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
          ADVANCED: This method is used to remove an object from a collection once the changeSet is applied.
 java.lang.String toString()
          INTERNAL: Print the mapping attribute name, this is used in error messages.
 void updateChangeRecord(java.lang.Object clone, java.lang.Object newValue, java.lang.Object oldValue, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Either create a new change record or update the change record with the new value.
 void updateCollectionChangeRecord(CollectionChangeEvent event, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
          INTERNAL: Add or removes a new value and its change set to the collection change record based on the event passed in.
 void validateAfterInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Allow for subclasses to perform validation.
 void validateBeforeInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Allow for subclasses to perform validation.
 java.lang.Object valueFromObject(java.lang.Object anObject, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.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.
 java.lang.Object valueFromResultSet(java.sql.ResultSet resultSet, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor, java.sql.ResultSetMetaData metaData, int columnNumber, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
          INTERNAL: Returns the value for the mapping directly from the result-set.
 java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery query)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 boolean verifyDelete(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: To verify if the specified object has been deleted or not.
 void writeFromAttributeIntoRow(java.lang.Object attribute, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void writeFromObjectIntoRowForShallowInsert(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.
 void writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.
 void writeFromObjectIntoRowForUpdate(WriteObjectQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row)
          INTERNAL:
 void writeFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
          INTERNAL: A subclass should implement this method if it wants different behavior.
 void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Write fields needed for insert into the template for with null values.
 void writeUpdateFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Write fields needed for update into the template for with null values.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_FIELDS

protected static final java.util.Vector NO_FIELDS
Used to reduce memory for mappings with no fields.


NO_WEIGHT

protected static final java.lang.Integer NO_WEIGHT
Used to share integer instance to reduce memory.


WEIGHT_1

protected static final java.lang.Integer WEIGHT_1

descriptor

protected ClassDescriptor descriptor
ClassDescriptor to which this mapping belongs to


attributeAccessor

protected AttributeAccessor attributeAccessor
Wrapper to store the reference objects.


isReadOnly

protected boolean isReadOnly
Makes this mapping read only. No write are performed on it. Default is false


isOptional

protected boolean isOptional
Specifies whether this mapping is optional (i.e. field may be null). Used for DDL generation.


isLazy

protected java.lang.Boolean isLazy
Specifies whether this mapping is lazy, this means not included in the default fetch group.


fields

protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields
Fields associated with the mappings are cached


isRemotelyInitialized

protected boolean isRemotelyInitialized
It is needed only in remote initialization and mapping is in parent descriptor


weight

protected java.lang.Integer weight
This is a TopLink defined attribute that allows us to sort the mappings


properties

protected java.util.Map properties
Allow user defined properties.


derivesId

protected boolean derivesId
Used by the CMP3Policy to see if this mapping should be used in processing pk classes for find methods


isJPAId

protected boolean isJPAId

mapsIdValue

protected java.lang.String mapsIdValue
A mapsId value.


derivedIdMapping

protected DatabaseMapping derivedIdMapping
The id mapping this mapping derives. Used by the CMP3Policy to see if this mapping should be used in processing pk classes for find methods.


isPrimaryKeyMapping

protected boolean isPrimaryKeyMapping
PERF: Used as a quick check to see if this mapping is a primary key mapping, set by the object builder during initialization.


attributeName

protected java.lang.String attributeName
PERF: Cache the mappings attribute name.


isMapKeyMapping

protected boolean isMapKeyMapping
Records if this mapping is being used as a MapKeyMapping. This is important for recording main mappings

Constructor Detail

DatabaseMapping

public DatabaseMapping()
PUBLIC: Default constructor.

Method Detail

buildBackupClone

public abstract void buildBackupClone(java.lang.Object clone,
                                      java.lang.Object backup,
                                      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Clone the attribute from the clone and assign it to the backup.


buildBackupCloneForPartObject

public java.lang.Object buildBackupCloneForPartObject(java.lang.Object attributeValue,
                                                      java.lang.Object clone,
                                                      java.lang.Object backup,
                                                      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Require for cloning, the part must be cloned.


buildClone

public abstract void buildClone(java.lang.Object original,
                                java.lang.Object clone,
                                org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Clone the attribute from the original and assign it to the clone.


buildCloneFromRow

public abstract void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                                       org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                       java.lang.Object clone,
                                       ObjectBuildingQuery sourceQuery,
                                       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                       org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: A combination of readFromRowIntoObject and buildClone.

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.


buildShallowOriginalFromRow

public void buildShallowOriginalFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                                        java.lang.Object original,
                                        org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                        ObjectBuildingQuery query,
                                        org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: Builds a shallow original object. Only direct attributes and primary keys are populated. In this way the minimum original required for instantiating a working copy clone can be built without placing it in the shared cache (no concern over cycles).


buildCloneForPartObject

public java.lang.Object buildCloneForPartObject(java.lang.Object attributeValue,
                                                java.lang.Object original,
                                                java.lang.Object clone,
                                                org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                                boolean isExisting)
INTERNAL: Require for cloning, the part must be cloned.


buildCopy

public void buildCopy(java.lang.Object copy,
                      java.lang.Object original,
                      CopyGroup group)
INTERNAL: Copy of the attribute of the object. This is NOT used for unit of work but for templatizing an object.


buildExpression

public Expression buildExpression(java.lang.Object queryObject,
                                  QueryByExamplePolicy policy,
                                  Expression expressionBuilder,
                                  java.util.Map processedObjects,
                                  org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: In case Query By Example is used, this method builds and returns an expression that corresponds to a single attribue and it's value.


buildObjectJoinExpression

public Expression buildObjectJoinExpression(Expression base,
                                            java.lang.Object value,
                                            org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used to allow object level comparisons.


buildObjectJoinExpression

public Expression buildObjectJoinExpression(Expression base,
                                            Expression argument,
                                            org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used to allow object level comparisons.


cascadePerformRemoveIfRequired

public abstract void cascadePerformRemoveIfRequired(java.lang.Object object,
                                                    org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
                                                    java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascade


cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired

public void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object,
                                                                          org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
                                                                          java.util.Map visitedObjects)
INTERNAL: Cascade removal of orphaned private owned objects from the UnitOfWorkChangeSet


cascadeRegisterNewIfRequired

public abstract void cascadeRegisterNewIfRequired(java.lang.Object object,
                                                  org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
                                                  java.util.Map visitedObjects)
INTERNAL: Cascade registerNew for Create through mappings that require the cascade


cascadeDiscoverAndPersistUnregisteredNewObjects

public void cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object,
                                                            java.util.Map newObjects,
                                                            java.util.Map unregisteredExistingObjects,
                                                            java.util.Map visitedObjects,
                                                            org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Cascade discover and persist new objects during commit.


calculateDeferredChanges

public void calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
                                     org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes as apposed to detected changes. If an attribute can not be change tracked it's changes can be detected through this process.


cascadeMerge

public void cascadeMerge(java.lang.Object sourceElement,
                         org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Cascade the merge to the component object, if appropriate.


clone

public java.lang.Object clone()
INTERNAL: Clones itself.

Overrides:
clone in class java.lang.Object

cloneFields

protected java.util.Vector cloneFields(java.util.Vector fields)
INTERNAL: Helper method to clone vector of fields (used in aggregate initialization cloning).


collectFields

protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> collectFields()
This method must be overwritten in the subclasses to return a vector of all the fields this mapping represents.


compareForChange

public abstract org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone,
                                                                                        java.lang.Object backup,
                                                                                        org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
                                                                                        org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This method was created in VisualAge.

Returns:
prototype.changeset.ChangeRecord

compareObjects

public abstract boolean compareObjects(java.lang.Object firstObject,
                                       java.lang.Object secondObject,
                                       org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Compare the attributes belonging to this mapping for the objects.


convertClassNamesToClasses

public void convertClassNamesToClasses(java.lang.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.

Parameters:
classLoader -

createUnitOfWorkValueHolder

public org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder createUnitOfWorkValueHolder(ValueHolderInterface attributeValue,
                                                                                                      java.lang.Object original,
                                                                                                      java.lang.Object clone,
                                                                                                      org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                                                                                      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
                                                                                                      boolean buildDirectlyFromRow)
INTERNAL: Builder the unit of work value holder.

Parameters:
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.

derivesId

public boolean derivesId()
ADVANCED: Returns true if the mapping references a JPA ID attribute for the CMP3Policy and JPA ID classes.


earlyPreDelete

public void earlyPreDelete(DeleteObjectQuery query)
INTERNAL: This method is called to update collection tables prior to commit.


extractNestedExpressions

protected java.util.List<Expression> extractNestedExpressions(java.util.List<Expression> expressions,
                                                              ExpressionBuilder newRoot,
                                                              boolean rootExpressionsAllowed)
INTERNAL: Extract the nested attribute expressions that apply to this mapping. This is used for partial objects and joining.

Parameters:
rootExpressionsAllowed - true if newRoot itself can be one of the expressions returned

hasRootExpressionThatShouldUseOuterJoin

protected boolean hasRootExpressionThatShouldUseOuterJoin(java.util.List expressions)
INTERNAL: If there is root expression in the list then indicates whether it shouldUseOuterJoin, otherwise return false.


fixObjectReferences

public abstract void fixObjectReferences(java.lang.Object object,
                                         java.util.Map objectDescriptors,
                                         java.util.Map processedObjects,
                                         ObjectLevelReadQuery query,
                                         RemoteSession session)
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.


fixRealObjectReferences

public void fixRealObjectReferences(java.lang.Object object,
                                    java.util.Map objectInformation,
                                    java.util.Map processedObjects,
                                    ObjectLevelReadQuery query,
                                    RemoteSession session)
INTERNAL: At this point, we realize we don't have indirection; so we need to replace the reference object(s) with the corresponding object(s) from the remote session. The default is to do nothing.


getAttributeAccessor

public AttributeAccessor getAttributeAccessor()
ADVANCED: Return the attributeAccessor. The attribute accessor is responsible for setting and retrieving the attribute value from the object for this mapping.


getAttributeClassification

public java.lang.Class getAttributeClassification()
PUBLIC: The classification type for the attribute this mapping represents


getAttributeName

public java.lang.String getAttributeName()
PUBLIC: Return the name of the attribute set in the mapping.


getAttributeValueFromObject

public java.lang.Object getAttributeValueFromObject(java.lang.Object object)
                                             throws DescriptorException
INTERNAL: Return the value of an attribute which this mapping represents for an object.

Throws:
DescriptorException

getContainerPolicy

public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
INTERNAL: Return the mapping's containerPolicy.


getDerivedIdMapping

public DatabaseMapping getDerivedIdMapping()
ADVANCED: Set the maps id value


getDescriptor

public ClassDescriptor getDescriptor()
INTERNAL: Return the descriptor to which this mapping belongs


getField

public org.eclipse.persistence.internal.helper.DatabaseField getField()
INTERNAL: Return the field associated with this mapping if there is exactly one. This is required for object relational mapping to print them, but because they are defined in in an Enterprise context they cannot be cast to. Mappings that have a field include direct mappings and object relational mappings.


getFieldClassification

public java.lang.Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
INTERNAL: Return the classification for the field contained in the mapping. This is used to convert the row value to a consistent java value. By default this is unknown.


getSelectFields

public java.util.Vector getSelectFields()
INTERNAL: Returns the set of fields that should be selected to build this mapping's value(s). This is used by expressions to determine which fields to include in the select clause for non-object expressions.


getSelectTables

public java.util.Vector getSelectTables()
INTERNAL: Returns the table(s) that should be selected to build this mapping's value(s). This is used by expressions to determine which tables to include in the from clause for non-object expressions.


getFields

public java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getFields()
INTERNAL: Returns a vector of all the fields this mapping represents.


getGetMethodName

public java.lang.String getGetMethodName()
PUBLIC: This method is invoked reflectively on the reference object to return the value of the attribute in the object. This method returns the name of the getMethodName or null if not using method access.


hasMapsIdValue

public boolean hasMapsIdValue()
ADVANCED: Set the mapped by id value


getMapsIdValue

public java.lang.String getMapsIdValue()
ADVANCED: Set the mapped by id value


getObjectCorrespondingTo

public java.lang.Object getObjectCorrespondingTo(java.lang.Object object,
                                                 RemoteSession session,
                                                 java.util.Map objectDescriptors,
                                                 java.util.Map processedObjects,
                                                 ObjectLevelReadQuery query)
INTERNAL: return the object on the client corresponding to the specified object. The default is to simply return the object itself, without worrying about maintaining object identity.


getProperties

public java.util.Map getProperties()
INTERNAL: used as a temporary store for custom SDK usage


getProperty

public java.lang.Object getProperty(java.lang.Object property)
ADVANCED: Allow user defined properties.


getRealAttributeValueFromObject

public java.lang.Object getRealAttributeValueFromObject(java.lang.Object object,
                                                        org.eclipse.persistence.internal.sessions.AbstractSession session)
                                                 throws DescriptorException
INTERNAL: Return the value of an attribute unwrapping value holders if required.

Throws:
DescriptorException

getRealAttributeValueFromAttribute

public java.lang.Object getRealAttributeValueFromAttribute(java.lang.Object attributeValue,
                                                           java.lang.Object object,
                                                           org.eclipse.persistence.internal.sessions.AbstractSession session)
                                                    throws DescriptorException
INTERNAL: Return the value of an attribute unwrapping value holders if required.

Throws:
DescriptorException

instantiateAttribute

public void instantiateAttribute(java.lang.Object object,
                                 org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Trigger the instantiation of the attribute if lazy.


getRealCollectionAttributeValueFromObject

public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object,
                                                                  org.eclipse.persistence.internal.sessions.AbstractSession session)
                                                           throws DescriptorException
INTERNAL: Return the value of an attribute, unwrapping value holders if necessary. If the value is null, build a new container.

Throws:
DescriptorException

getReferenceDescriptor

public ClassDescriptor getReferenceDescriptor()
PUBLIC: Return the referenceDescriptor. This is a descriptor which is associated with the reference class.


getRelationshipPartner

public DatabaseMapping getRelationshipPartner()
INTERNAL: Return the relationshipPartner mapping for this bi-directional mapping. If the relationshipPartner is null then this is a uni-directional mapping.


getSetMethodName

public java.lang.String getSetMethodName()
PUBLIC: This method is invoked reflectively on the reference object to set the value of the attribute in the object. This method returns the name of the setMethodName or null if not using method access.


getValueFromRemoteValueHolder

public java.lang.Object getValueFromRemoteValueHolder(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
INTERNAL: extract and return the appropriate value from the specified remote value holder


getWeight

public java.lang.Integer getWeight()
INTERNAL: Return the weight of the mapping, used to sort mappings to ensure that DirectToField Mappings get merged first


hasConstraintDependency

public boolean hasConstraintDependency()
INTERNAL: The returns if the mapping has any constraint dependencies, such as foreign keys and join tables.


isUsingMethodAccess

public boolean isUsingMethodAccess()
PUBLIC: Return if method access is used.


hasDependency

public boolean hasDependency()
INTERNAL: Return if the mapping has any ownership or other dependency over its target object(s).


hasInverseConstraintDependency

public boolean hasInverseConstraintDependency()
INTERNAL: The returns if the mapping has any inverse constraint dependencies, such as foreign keys and join tables.


initialize

public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
                throws DescriptorException
INTERNAL: Allow for initialization of properties and validation.

Throws:
DescriptorException

isAggregateCollectionMapping

public boolean isAggregateCollectionMapping()
INTERNAL: Related mapping should implement this method to return true.


isAggregateMapping

public boolean isAggregateMapping()
INTERNAL: Related mapping should implement this method to return true.


isAggregateObjectMapping

public boolean isAggregateObjectMapping()
INTERNAL: Related mapping should implement this method to return true.


isCollectionMapping

public boolean isCollectionMapping()
INTERNAL: Related mapping should implement this method to return true.


isDatabaseMapping

public boolean isDatabaseMapping()
INTERNAL:


isDirectCollectionMapping

public boolean isDirectCollectionMapping()
INTERNAL: Related mapping should implement this method to return true.


isDirectMapMapping

public boolean isDirectMapMapping()
INTERNAL: Related mapping should implement this method to return true.


isDirectToFieldMapping

public boolean isDirectToFieldMapping()
INTERNAL: Related mapping should implement this method to return true.


isForeignReferenceMapping

public boolean isForeignReferenceMapping()
INTERNAL: Related mapping should implement this method to return true.


isLockableMapping

public boolean isLockableMapping()
INTERNAL: Return whether this mapping should be traversed when we are locking

Returns:

isManyToManyMapping

public boolean isManyToManyMapping()
INTERNAL: Related mapping should implement this method to return true.


isMapKeyMapping

public boolean isMapKeyMapping()
Returns:
the isMapKeyMapping

setIsMapKeyMapping

public void setIsMapKeyMapping(boolean isMapKeyMapping)
Parameters:
isMapKeyMapping - the isMapKeyMapping to set

isNestedTableMapping

public boolean isNestedTableMapping()
INTERNAL: Related mapping should implement this method to return true.


isObjectReferenceMapping

public boolean isObjectReferenceMapping()
INTERNAL: Related mapping should implement this method to return true.


isOneToManyMapping

public boolean isOneToManyMapping()
INTERNAL: Related mapping should implement this method to return true.


isOneToOneMapping

public boolean isOneToOneMapping()
INTERNAL: Related mapping should implement this method to return true.


isManyToOneMapping

public boolean isManyToOneMapping()
INTERNAL: Related mapping should implement this method to return true.


isOptional

public boolean isOptional()
Return whether the value of this mapping is optional (that is, can be null). This is a hint and is used when generating DDL.


isOwned

public boolean isOwned()
Returns true if this mapping is owned by the parent descriptor. This is generally based on mapping type


isJPAId

public boolean isJPAId()
INTERNAL: Flags that this mapping is part of a JPA id mapping. It should be temporary though, as the CMP3Policy should be able to figure things out on its own. The problem being that the JPA mapped superclass descriptors are not initialized and do not have a CMP3Policy set by default.


isLazy

public boolean isLazy()
Return if this mapping is lazy. Lazy has different meaning for different mappings. For basic/direct mappings, this can be used exclude it from the descriptor's default fetch group. This means that queries will not include the field(s) required by this mapping by default. This can only be used if the descriptor has a FetchGroupManager and class implements the FetchGroupTracker interface (or is weaved).

For relationship mappings this should normally be the same value as indirection, however for eager relationships this can be used with indirection to allow indirection locking and change tracking, but still always force instantiation.


setIsJPAId

public void setIsJPAId()
INTERNAL: Flags that this mapping is part of a JPA id mapping. It should be temporary though, as the CMP3Policy should be able to figure things out on its own. The problem being that the JPA mapped superclass descriptors are not initialized and do not have a CMP3Policy set by default.


setIsLazy

public void setIsLazy(boolean isLazy)
Set if this mapping is lazy. This can be used for any mapping type to exclude it from the descriptor's default fetch group. This means that queries will not include the field(s) required by this mapping by default. This can only be used if the descriptor has a FetchGroupManager and class implements the FetchGroupTracker interface (or is weaved). This is not the same as indirection on relationships (lazy relationships), as it defers the loading of the source object fields, not the relationship.


isEISMapping

public boolean isEISMapping()
INTERNAL: All EIS mappings should implement this method to return true.


isRelationalMapping

public boolean isRelationalMapping()
INTERNAL: All relational mappings should implement this method to return true.


isXMLMapping

public boolean isXMLMapping()
INTERNAL: All relational mappings should implement this method to return true.


isAbstractDirectMapping

public boolean isAbstractDirectMapping()
INTERNAL: Related mapping should implement this method to return true.


isAbstractCompositeDirectCollectionMapping

public boolean isAbstractCompositeDirectCollectionMapping()
INTERNAL: Related mapping should implement this method to return true.


isAbstractCompositeObjectMapping

public boolean isAbstractCompositeObjectMapping()
INTERNAL: Related mapping should implement this method to return true.


isAbstractCompositeCollectionMapping

public boolean isAbstractCompositeCollectionMapping()
INTERNAL: Related mapping should implement this method to return true.


isJoiningSupported

public boolean isJoiningSupported()
INTERNAL: Return if this mapping support joining.


isCloningRequired

public boolean isCloningRequired()
INTERNAL: Return if this mapping requires its attribute value to be cloned.


isPrimaryKeyMapping

public boolean isPrimaryKeyMapping()
INTERNAL: Set by the Object builder during initialization returns true if this mapping is used as a primary key mapping.


isCandidateForPrivateOwnedRemoval

public boolean isCandidateForPrivateOwnedRemoval()
INTERNAL: Returns true if the mapping should be added to the UnitOfWork's list of private owned objects for private owned orphan removal.


isCascadedLockingSupported

public boolean isCascadedLockingSupported()
INTERNAL: Used when determining if a mapping supports cascaded version optimistic locking.


isChangeTrackingSupported

public boolean isChangeTrackingSupported(Project project)
INTERNAL: Return if this mapping supports change tracking.


isPrivateOwned

public boolean isPrivateOwned()
INTERNAL: Return if the mapping has ownership over its target object(s).


isReadOnly

public boolean isReadOnly()
INTERNAL: Returns true if mapping is read only else false.


isReferenceMapping

public boolean isReferenceMapping()
INTERNAL: Related mapping should implement this method to return true.


isRemotelyInitialized

protected boolean isRemotelyInitialized()

isStructureMapping

public boolean isStructureMapping()
INTERNAL: Related mapping should implement this method to return true.


isTransformationMapping

public boolean isTransformationMapping()
INTERNAL: Related mapping should implement this method to return true.


isUnidirectionalOneToManyMapping

public boolean isUnidirectionalOneToManyMapping()
INTERNAL:


isVariableOneToOneMapping

public boolean isVariableOneToOneMapping()
INTERNAL: Related mapping should implement this method to return true.


isDirectToXMLTypeMapping

public boolean isDirectToXMLTypeMapping()
INTERNAL: Related mapping should implement this method to return true.


isWriteOnly

public boolean isWriteOnly()
INTERNAL: Some mappings support no attribute (transformation).


iterate

public abstract void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL: Iterate on the appropriate attribute value.


iterateOnRealAttributeValue

public void iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
                                        java.lang.Object realAttributeValue)
INTERNAL: Iterate on the attribute value. The value holder has already been processed.


mergeChangesIntoObject

public abstract void mergeChangesIntoObject(java.lang.Object target,
                                            org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
                                            java.lang.Object source,
                                            org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Merge changes from the source to the target object.


mergeIntoObject

public abstract void mergeIntoObject(java.lang.Object target,
                                     boolean isTargetUninitialized,
                                     java.lang.Object source,
                                     org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Merge changes from the source to the target object.


performDataModificationEvent

public void performDataModificationEvent(java.lang.Object[] event,
                                         org.eclipse.persistence.internal.sessions.AbstractSession session)
                                  throws DatabaseException,
                                         DescriptorException
INTERNAL: Perform the commit event. This is used in the uow to delay data modifications.

Throws:
DatabaseException
DescriptorException

postDelete

public void postDelete(DeleteObjectQuery query)
                throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Recurse thru the parts to delete the reference objects after the actual object is deleted.

Throws:
DatabaseException

postInitialize

public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
                    throws DescriptorException
INTERNAL: Allow for initialization of properties and validation that have dependecies no the descriptor being initialized.

Throws:
DescriptorException

postInsert

public void postInsert(WriteObjectQuery query)
                throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Recurse thru the parts to insert the reference objects after the actual object is inserted.

Throws:
DatabaseException

postUpdate

public void postUpdate(WriteObjectQuery query)
                throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Recurse thru the parts to update the reference objects after the actual object is updated.

Throws:
DatabaseException

preDelete

public void preDelete(DeleteObjectQuery query)
               throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Recurse thru the parts to delete the reference objects before the actual object is deleted.

Throws:
DatabaseException

preInitialize

public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
                   throws DescriptorException
INTERNAL: Allow for initialization of properties and validation.

Throws:
DescriptorException

preInsert

public void preInsert(WriteObjectQuery query)
               throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Recurse thru the parts to insert the reference objects before the actual object is inserted.

Throws:
DatabaseException

prepareCascadeLockingPolicy

public 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.


preUpdate

public void preUpdate(WriteObjectQuery query)
               throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Recurse thru the parts to update the reference objects before the actual object is updated.

Throws:
DatabaseException

readFromRowIntoObject

public java.lang.Object readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                                              org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                              java.lang.Object targetObject,
                                              ObjectBuildingQuery sourceQuery,
                                              org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
                                       throws DatabaseException
INTERNAL: Extract value from the row and set the attribute to this value in the object. return value as this value will have been converted to the appropriate type for the object.

Throws:
DatabaseException

readFromResultSetIntoObject

public java.lang.Object readFromResultSetIntoObject(java.sql.ResultSet resultSet,
                                                    java.lang.Object targetObject,
                                                    ObjectBuildingQuery query,
                                                    org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                    org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor,
                                                    java.sql.ResultSetMetaData metaData,
                                                    int columnNumber,
                                                    org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
                                             throws java.sql.SQLException
INTERNAL: Extract values directly from the result-set. PERF: This is used for optimized object building directly from the result-set.

Throws:
java.sql.SQLException

readOnly

public void readOnly()
PUBLIC: To make mapping read only. Read-only mappings can be used if two attributes map to the same field. Read-only mappings cannot be used for the primary key or other required fields.


readWrite

public void readWrite()
PUBLIC: The mapping can be dynamically made either readOnly or readWriteOnly. This makes mapping go back to default mode.


rehashFieldDependancies

public void rehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Rehash any hashtables based on fields. This is used to clone descriptors for aggregates, which hammer field names, it is probably better not to hammer the field name and this should be refactored.


remoteInitialization

public void remoteInitialization(DistributedSession session)
INTERNAL: Once descriptors are serialized to the remote session. All its mappings and reference descriptors are traversed. Usually mappings are initilaized and serialized reference descriptors are replaced with local descriptors if they already exist on the remote session.


remotelyInitialized

protected void remotelyInitialized()
Set the mapping to be initialized for the remote session.


replaceValueHoldersIn

public java.util.Map replaceValueHoldersIn(java.lang.Object object,
                                           org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
INTERNAL: replace the value holders in the specified reference object(s)


setAttributeAccessor

public void setAttributeAccessor(AttributeAccessor attributeAccessor)
ADVANCED: Set the attributeAccessor. The attribute accessor is responsible for setting and retrieving the attribute value from the object for this mapping. This can be set to an implementor of AttributeAccessor if the attribute requires advanced conversion of the mapping value, or a real attribute does not exist.


setAttributeName

public void setAttributeName(java.lang.String attributeName)
PUBLIC: Sets the name of the attribute in the mapping.


setAttributeValueInObject

public void setAttributeValueInObject(java.lang.Object object,
                                      java.lang.Object value)
                               throws DescriptorException
INTERNAL: Set the value of the attribute mapped by this mapping.

Throws:
DescriptorException

setRealAttributeValueInObject

public void setRealAttributeValueInObject(java.lang.Object object,
                                          java.lang.Object value)
                                   throws DescriptorException
INTERNAL: Set the value of the attribute mapped by this mapping, placing it inside a value holder if necessary.

Throws:
DescriptorException

setDescriptor

public void setDescriptor(ClassDescriptor descriptor)
INTERNAL: Set the descriptor to which this mapping belongs


setFields

protected void setFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> fields)
INTERNAL: Set the mapping's field collection.


setGetMethodName

public void setGetMethodName(java.lang.String methodName)
PUBLIC: This method is invoked reflectively on the reference object to return the value of the attribute in the object. This method sets the name of the getMethodName.


setIsOptional

public void setIsOptional(boolean isOptional)
Used to specify whether the value of this mapping may be null. This is used when generating DDL.


setIsPrimaryKeyMapping

public void setIsPrimaryKeyMapping(boolean isPrimaryKeyMapping)
INTERNAL: Set by the Object builder during initialization returns true if this mapping is used as a primary key mapping.


setIsReadOnly

public void setIsReadOnly(boolean aBoolean)
PUBLIC: Set this mapping to be read only. Read-only mappings can be used if two attributes map to the same field. Read-only mappings cannot be used for the primary key or other required fields.


setMapsIdValue

public void setMapsIdValue(java.lang.String mapsIdValue)
ADVANCED: Set the maps id value


setProperties

public void setProperties(java.util.Map properties)
INTERNAL: Allow user defined properties.


setProperty

public void setProperty(java.lang.Object property,
                        java.lang.Object value)
ADVANCED: Allow user defined properties.


setSetMethodName

public void setSetMethodName(java.lang.String methodName)
PUBLIC: Set the methodName used to set the value for the mapping's attribute into the object.


setWeight

public void setWeight(java.lang.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. Ordering of Mappings can be achieved by setting the weight of a particular mapping to a value within the above mentioned limits. By ordering mappings the user can control what order relationships are processed by TopLink.


simpleAddToCollectionChangeRecord

public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
                                              java.lang.Object changeSetToAdd,
                                              org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
                                              org.eclipse.persistence.internal.sessions.AbstractSession session)
                                       throws DescriptorException
ADVANCED: This method is used to add an object to a collection once the changeSet is applied. The referenceKey parameter should only be used for direct Maps.

Throws:
DescriptorException

simpleRemoveFromCollectionChangeRecord

public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
                                                   java.lang.Object changeSetToAdd,
                                                   org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
                                                   org.eclipse.persistence.internal.sessions.AbstractSession session)
                                            throws DescriptorException
ADVANCED: This method is used to remove an object from a collection once the changeSet is applied. The referenceKey parameter should only be used for direct Maps.

Throws:
DescriptorException

toString

public java.lang.String toString()
INTERNAL: Print the mapping attribute name, this is used in error messages.

Overrides:
toString in class java.lang.Object

validateAfterInitialization

public void validateAfterInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
                                 throws DescriptorException
INTERNAL: Allow for subclasses to perform validation.

Throws:
DescriptorException

validateBeforeInitialization

public void validateBeforeInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
                                  throws DescriptorException
INTERNAL: Allow for subclasses to perform validation.

Throws:
DescriptorException

valueFromObject

public java.lang.Object valueFromObject(java.lang.Object anObject,
                                        org.eclipse.persistence.internal.helper.DatabaseField field,
                                        org.eclipse.persistence.internal.sessions.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. Return the Value from the object.


valueFromRow

public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                     org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                     ObjectBuildingQuery query)
                              throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Returns the value for the mapping from the database row.

Throws:
DatabaseException

valueFromRow

public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                     org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
                                     ObjectBuildingQuery query,
                                     org.eclipse.persistence.internal.sessions.AbstractSession session)
                              throws DatabaseException
INTERNAL: A subclass should implement this method if it wants different behavior. Returns the value for the mapping from the database row. The execution session is the session the query was executed on, and its platform should be used for data conversion.

Throws:
DatabaseException

valueFromResultSet

public java.lang.Object valueFromResultSet(java.sql.ResultSet resultSet,
                                           ObjectBuildingQuery query,
                                           org.eclipse.persistence.internal.sessions.AbstractSession session,
                                           org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor accessor,
                                           java.sql.ResultSetMetaData metaData,
                                           int columnNumber,
                                           org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
                                    throws java.sql.SQLException
INTERNAL: Returns the value for the mapping directly from the result-set. PERF: Used for optimized object building.

Throws:
java.sql.SQLException

verifyDelete

public boolean verifyDelete(java.lang.Object object,
                            org.eclipse.persistence.internal.sessions.AbstractSession session)
                     throws DatabaseException
INTERNAL: To verify if the specified object has been deleted or not.

Throws:
DatabaseException

writeFromAttributeIntoRow

public void writeFromAttributeIntoRow(java.lang.Object attribute,
                                      org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                      org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: A subclass should implement this method if it wants different behavior. Write the foreign key values from the attribute to the row.


writeFromObjectIntoRow

public void writeFromObjectIntoRow(java.lang.Object object,
                                   org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                   org.eclipse.persistence.internal.sessions.AbstractSession session,
                                   DatabaseMapping.WriteType writeType)
INTERNAL: A subclass should implement this method if it wants different behavior. Write the attribute value from the object to the row.


writeFromObjectIntoRowForShallowInsert

public void writeFromObjectIntoRowForShallowInsert(java.lang.Object object,
                                                   org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                                   org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.


writeFromObjectIntoRowWithChangeRecord

public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
                                                   org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                                   org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                   DatabaseMapping.WriteType writeType)
INTERNAL: A subclass should implement this method if it wants different behavior. Write the attribute value from the object to the row.


writeFromObjectIntoRowForShallowInsertWithChangeRecord

public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
                                                                   org.eclipse.persistence.internal.sessions.AbstractRecord row,
                                                                   org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.


writeFromObjectIntoRowForUpdate

public void writeFromObjectIntoRowForUpdate(WriteObjectQuery query,
                                            org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:


writeFromObjectIntoRowForWhereClause

public void writeFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query,
                                                 org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL: A subclass should implement this method if it wants different behavior. Write the attribute value from the object to the row.


writeInsertFieldsIntoRow

public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                                     org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Write fields needed for insert into the template for with null values.


writeUpdateFieldsIntoRow

public void writeUpdateFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
                                     org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Write fields needed for update into the template for with null values. By default inserted fields are used.


updateChangeRecord

public void updateChangeRecord(java.lang.Object clone,
                               java.lang.Object newValue,
                               java.lang.Object oldValue,
                               org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
                               org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
                        throws DescriptorException
INTERNAL: Either create a new change record or update the change record with the new value. This is used by attribute change tracking.

Throws:
DescriptorException

updateCollectionChangeRecord

public void updateCollectionChangeRecord(CollectionChangeEvent event,
                                         org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
                                         org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
                                  throws DescriptorException
INTERNAL: Add or removes a new value and its change set to the collection change record based on the event passed in. This is used by attribute change tracking.

Throws:
DescriptorException

setChangeListener

public void setChangeListener(java.lang.Object clone,
                              java.beans.PropertyChangeListener listener,
                              org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Set the change listener if required. This is required for collections and aggregates or other change tracked mutable objects. This is used for resuming or flushing units of work.


setDerivesId

public void setDerivesId(boolean derivesId)
ADVANCED: Used to indicate the mapping references a JPA ID or MapsId attribute for the CMP3Policy and JPA Id classes (as well as Embeddable Id classes). This is different from isPrimaryKeyMapping, as an ID mapping is user specified and can be read only, as long as another writable mapping for the field exists.


setDerivedIdMapping

public void setDerivedIdMapping(DatabaseMapping derivedIdMapping)
ADVANCED: Used to indicate the mapping references a JPA ID or MapsId attribute for the CMP3Policy and JPA Id classes (as well as Embeddable Id classes). This is different from isPrimaryKeyMapping, as an ID mapping is user specified and can be read only, as long as another writable mapping for the field exists.


buildChangeRecord

public org.eclipse.persistence.internal.sessions.ChangeRecord buildChangeRecord(java.lang.Object newValue,
                                                                                org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
                                                                                org.eclipse.persistence.internal.sessions.AbstractSession session)
                                                                         throws DescriptorException
INTERNAL: Directly build a change record without comparison

Throws:
DescriptorException

postCalculateChanges

public void postCalculateChanges(ChangeRecord changeRecord,
                                 org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated.


postCalculateChangesOnDeleted

public void postCalculateChangesOnDeleted(java.lang.Object deletedObject,
                                          org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet uowChangeSet,
                                          org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.


recordPrivateOwnedRemovals

public void recordPrivateOwnedRemovals(java.lang.Object object,
                                       org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.


EclipseLink 2.1.2, build 'v20101206-r8635' API Reference