Top Description Inners Fields Constructors Methods
org.eclipse.persistence.mappings

public abstract Class DatabaseMapping

extends CoreMapping<AttributeAccessor, AbstractSession, ContainerPolicy, ClassDescriptor, DatabaseField>
implements Cloneable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.lang.Cloneable
Known Direct Subclasses
org.eclipse.persistence.mappings.ForeignReferenceMapping, org.eclipse.persistence.mappings.foundation.AbstractColumnMapping, org.eclipse.persistence.mappings.foundation.AbstractCompositeDirectCollectionMapping, org.eclipse.persistence.mappings.foundation.AbstractTransformationMapping, org.eclipse.persistence.oxm.mappings.XMLAbstractAnyMapping, org.eclipse.persistence.oxm.mappings.XMLAnyAttributeMapping, org.eclipse.persistence.oxm.mappings.XMLChoiceCollectionMapping, org.eclipse.persistence.oxm.mappings.XMLChoiceObjectMapping, org.eclipse.persistence.internal.dynamic.DynamicEntityImpl.UnknownMapping, org.eclipse.persistence.mappings.AggregateMapping
Imports
java.beans.PropertyChangeListener, java.io.Serializable, java.security.AccessController, .PrivilegedActionException, java.sql.ResultSet, .ResultSetMetaData, .SQLException, java.util.ArrayList, .Enumeration, .HashMap, .Iterator, .List, .Map, .Set, .Vector, org.eclipse.persistence.core.mappings.CoreMapping, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.DatabaseException, .DescriptorException, .QueryException, .ValidationException, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.indirection.ValueHolderInterface, org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor, .DatabasePlatform, org.eclipse.persistence.internal.descriptors.ClassNameConversionRequired, .DescriptorIterator, .InstanceVariableAttributeAccessor, .MethodAttributeAccessor, org.eclipse.persistence.internal.expressions.ObjectExpression, .QueryKeyExpression, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, .DatabaseTable, .IdentityHashSet, .NonSynchronizedVector, org.eclipse.persistence.internal.identitymaps.CacheKey, org.eclipse.persistence.internal.indirection.DatabaseValueHolder, org.eclipse.persistence.internal.queries.AttributeItem, .ContainerPolicy, .JoinedAttributeManager, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .ChangeRecord, .MergeManager, .ObjectChangeSet, .UnitOfWorkChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.internal.sessions.remote.ObjectDescriptor, .RemoteSessionController, .RemoteValueHolder, org.eclipse.persistence.mappings.converters.Converter, org.eclipse.persistence.queries.DeleteObjectQuery, .ObjectBuildingQuery, .ObjectLevelModifyQuery, .ObjectLevelReadQuery, .QueryByExamplePolicy, .WriteObjectQuery, org.eclipse.persistence.sessions.CopyGroup, .Project, org.eclipse.persistence.sessions.remote.DistributedSession

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

Responsibilities:

Author
Sati
Since
TOPLink/Java 1.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
protected AttributeAccessor
attributeAccessor

Wrapper to store the reference objects.

protected 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 Vector<DatabaseField>
fields

Fields associated with the mappings are cached

protected boolean
protected Boolean
isInSopObject

Irrelevant (and not set) unless descriptor has SerializedObjectPolicy (SOP).

protected boolean
protected 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 String
mapsIdValue

A mapsId value.

protected static final Vector<DatabaseField>
NO_FIELDS

Used to reduce memory for mappings with no fields.

protected static final Integer
NO_WEIGHT

Used to share integer instance to reduce memory.

protected Map<K, V>
properties

Allow user defined properties.

protected Map<String, List<String>>
unconvertedProperties

Allow the user to defined un-converted properties which will be initialized at runtime.

protected Integer
weight

This is a TopLink defined attribute that allows us to sort the mappings

protected static final Integer
protected static final Integer
protected static final Integer
protected static final Integer

Constructor Summary

AccessConstructor and Description
protected
DatabaseMapping()

PUBLIC: Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addUnconvertedProperty(String
TODO
propertyName
,
String
TODO
propertyValue
,
String
TODO
propertyType
)

PUBLIC: Add an unconverted property (to be initialiazed at runtime)

public abstract void
buildBackupClone(Object
TODO
clone
,
Object
TODO
backup
,
UnitOfWorkImpl
TODO
unitOfWork
)

INTERNAL: Clone the attribute from the clone and assign it to the backup.

public Object

Returns:

TODO
buildBackupCloneForPartObject
(Object
TODO
attributeValue
,
Object
TODO
clone
,
Object
TODO
backup
,
UnitOfWorkImpl
TODO
unitOfWork
)

INTERNAL: Require for cloning, the part must be cloned.

public ChangeRecord
buildChangeRecord(Object newValue, ObjectChangeSet owner, AbstractSession session)

INTERNAL: Directly build a change record without comparison

public abstract void
buildClone(Object
TODO
original
,
CacheKey
TODO
cacheKey
,
Object
TODO
clone
,
Integer
TODO
refreshCascade
,
AbstractSession
TODO
cloningSession
)

INTERNAL: Clone the attribute from the original and assign it to the clone.

public Object

Returns:

TODO
buildCloneForPartObject
(Object
TODO
attributeValue
,
Object
TODO
original
,
CacheKey
TODO
cacheKey
,
Object
TODO
clone
,
AbstractSession
TODO
cloningSession
,
Integer
TODO
refreshCascade
,
boolean
TODO
isExisting
,
boolean
TODO
isFromSharedCache
)

INTERNAL: Require for cloning, the part must be cloned.

public abstract void
buildCloneFromRow(AbstractRecord
TODO
databaseRow
,
JoinedAttributeManager
TODO
joinManager
,
Object
TODO
clone
,
CacheKey
TODO
sharedCacheKey
,
ObjectBuildingQuery
TODO
sourceQuery
,
UnitOfWorkImpl
TODO
unitOfWork
,
AbstractSession
TODO
executionSession
)

INTERNAL: A combination of readFromRowIntoObject and buildClone.

public Object

Returns:

TODO
buildContainerClone
(Object
TODO
attributeValue
,
AbstractSession
TODO
cloningSession
)

INTERNAL: Performs a first level clone of the attribute.

public void
buildCopy(Object
TODO
copy
,
Object
TODO
original
,
CopyGroup
TODO
group
)

INTERNAL: Copy of the attribute of the object.

public Expression

Returns:

TODO
buildExpression
(Object
TODO
queryObject
,
QueryByExamplePolicy
TODO
policy
,
Expression
TODO
expressionBuilder
,
Map<K, V>
TODO
processedObjects
,
AbstractSession
TODO
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.

public Expression

Returns:

TODO
buildObjectJoinExpression
(Expression
TODO
base
,
Object
TODO
value
,
AbstractSession
TODO
session
)

INTERNAL: Used to allow object level comparisons.

public Expression

Returns:

TODO
buildObjectJoinExpression
(Expression
TODO
base
,
Expression
TODO
argument
,
AbstractSession
TODO
session
)

INTERNAL: Used to allow object level comparisons.

public void
buildShallowOriginalFromRow(AbstractRecord
TODO
databaseRow
,
Object
TODO
original
,
JoinedAttributeManager
TODO
joinManager
,
ObjectBuildingQuery
TODO
query
,
AbstractSession
TODO
executionSession
)

INTERNAL: Builds a shallow original object.

public void
calculateDeferredChanges(ChangeRecord
TODO
changeRecord
,
AbstractSession
TODO
session
)

INTERNAL: Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes as apposed to detected changes.

public void
cascadeDiscoverAndPersistUnregisteredNewObjects(Object
TODO
object
,
Map<K, V>
TODO
newObjects
,
Map<K, V>
TODO
unregisteredExistingObjects
,
Map<K, V>
TODO
visitedObjects
,
UnitOfWorkImpl
TODO
uow
,
Set<E>
TODO
cascadeErrors
)

INTERNAL: Cascade discover and persist new objects during commit.

public abstract void
cascadePerformRemoveIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

INTERNAL: Cascade registerNew for Create through mappings that require the cascade

public void
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

INTERNAL: Cascade removal of orphaned private owned objects from the UnitOfWorkChangeSet

public abstract void
cascadeRegisterNewIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

INTERNAL: Cascade registerNew for Create through mappings that require the cascade

public Object

Returns:

new instance of itself
clone
()

Overrides java.lang.Object.clone.

INTERNAL: Clones itself.
protected Vector<E>

Returns:

TODO
cloneFields
(Vector<E>
TODO
fields
)

INTERNAL: Helper method to clone vector of fields (used in aggregate initialization cloning).

protected Vector<DatabaseField>

Returns:

TODO
collectFields
()

This method must be overwritten in the subclasses to return a vector of all the fields this mapping represents.

public void
collectQueryParameters(Set<DatabaseField>
TODO
record
)

INTERNAL: This method is used to store the FK fields that can be cached that correspond to noncacheable mappings the FK field values will be used to re-issue the query when cloning the shared cache entity

public abstract ChangeRecord

Returns:

prototype.changeset.ChangeRecord TODO
compareForChange
(Object
TODO
clone
,
Object
TODO
backup
,
ObjectChangeSet
TODO
owner
,
AbstractSession
TODO
session
)

INTERNAL: This method was created in VisualAge.

public abstract boolean

Returns:

TODO
compareObjects
(Object
TODO
firstObject
,
Object
TODO
secondObject
,
AbstractSession
TODO
session
)

INTERNAL: Compare the attributes belonging to this mapping for the objects.

public void
convertClassNamesToClasses(ClassLoader
TODO
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.

protected void
convertConverterClassNamesToClasses(Converter
TODO
converter
,
ClassLoader
TODO
classLoader
)

Convenience method to ensure converters have an opportunity to convert any class names to classes during project setup.

public <T> DatabaseValueHolder<T>

Returns:

TODO
createCloneValueHolder
(ValueHolderInterface<T>
TODO
attributeValue
,
Object
TODO
original
,
Object
TODO
clone
,
AbstractRecord
TODO
row
,
AbstractSession
TODO
cloningSession
,
boolean
indicates that we are building the clone directly from a row as opposed to building the original from the row, putting it in the shared cache, and then cloning the original.
buildDirectlyFromRow
)

INTERNAL: Builder the unit of work value holder.

public boolean

Returns:

TODO
derivesId
()

ADVANCED: Returns true if the mapping references a JPA ID attribute for the CMP3Policy and JPA ID classes.

public void
earlyPreDelete(DeleteObjectQuery
TODO
query
,
Object
TODO
object
)

INTERNAL: This method is called to update collection tables prior to commit.

protected List<Expression>

Returns:

TODO
extractNestedExpressions
(List<Expression>
TODO
expressions
,
ExpressionBuilder
TODO
newRoot
)

INTERNAL: Extract the nested attribute expressions that apply to this mapping.

protected List<Expression>

Returns:

TODO
extractNestedNonAggregateExpressions
(List<Expression>
TODO
expressions
,
ExpressionBuilder
TODO
newRoot
,
boolean
true if newRoot itself can be one of the expressions returned (used for locking)
rootExpressionsAllowed
)

INTERNAL: Extract the nested attribute expressions that apply to this mapping.

public abstract void
fixObjectReferences(Object
TODO
object
,
Map<Object, ObjectDescriptor>
TODO
objectDescriptors
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
,
DistributedSession
TODO
session
)

INTERNAL: An object has been serialized from the server to the client.

public void
fixRealObjectReferences(Object
TODO
object
,
Map<Object, ObjectDescriptor>
TODO
objectInformation
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
,
DistributedSession
TODO
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.

public AttributeAccessor

Returns:

TODO
getAttributeAccessor
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getAttributeAccessor.

ADVANCED: Return the attributeAccessor.
public Class<?>

Returns:

TODO
getAttributeClassification
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getAttributeClassification.

PUBLIC: The classification type for the attribute this mapping represents
public String

Returns:

TODO
getAttributeName
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getAttributeName.

PUBLIC: Return the name of the attribute set in the mapping.
public Object
getAttributeValueFromObject(Object
TODO
object
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getAttributeValueFromObject.

INTERNAL: Return the value of an attribute which this mapping represents for an object.
public ContainerPolicy

Returns:

TODO
getContainerPolicy
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getContainerPolicy.

INTERNAL: Return the mapping's containerPolicy.
public DatabaseMapping

Returns:

TODO
getDerivedIdMapping
()

ADVANCED: Set the maps id value

public ClassDescriptor

Returns:

TODO
getDescriptor
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getDescriptor.

INTERNAL: Return the descriptor to which this mapping belongs
public DatabaseField

Returns:

TODO
getField
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getField.

INTERNAL: Return the field associated with this mapping if there is exactly one.
public Class<?>
getFieldClassification(DatabaseField fieldToClassify)

INTERNAL: Return the classification for the field contained in the mapping.

public Vector<DatabaseField>

Returns:

TODO
getFields
()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getFields.

INTERNAL: Returns a vector of all the fields this mapping represents.
public String

Returns:

TODO
getGetMethodName
()

PUBLIC: This method is invoked reflectively on the reference object to return the value of the attribute in the object.

public String

Returns:

TODO
getMapsIdValue
()

ADVANCED: Set the mapped by id value

public Object

Returns:

TODO
getObjectCorrespondingTo
(Object
TODO
object
,
DistributedSession
TODO
session
,
Map<Object, ObjectDescriptor>
TODO
objectDescriptors
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
)

INTERNAL: return the object on the client corresponding to the specified object.

public List<Expression>
getOrderByNormalizedExpressions(Expression base)

INTERNAL: Return the list of fields that should be used if this mapping is used in an order by.

public Map<K, V>

Returns:

TODO
getProperties
()

INTERNAL: used as a temporary store for custom SDK usage

public Object

Returns:

TODO
getProperty
(Object
TODO
property
)

ADVANCED: Allow user defined properties.

public Object
getRealAttributeValueFromAttribute(Object attributeValue, Object object, AbstractSession session)

INTERNAL: Return the value of an attribute unwrapping value holders if required.

public Object
getRealAttributeValueFromObject(Object object, AbstractSession session)

INTERNAL: Return the value of an attribute unwrapping value holders if required.

public Object
getRealCollectionAttributeValueFromObject(Object object, AbstractSession session)

INTERNAL: Return the value of an attribute, unwrapping value holders if necessary.

public ClassDescriptor
getReferenceDescriptor()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.getReferenceDescriptor.

PUBLIC: Return the referenceDescriptor.
public DatabaseMapping
getRelationshipPartner()

INTERNAL: Return the relationshipPartner mapping for this bi-directional mapping.

public Vector<E>

Returns:

TODO
getSelectFields
()

INTERNAL: Returns the set of fields that should be selected to build this mapping's value(s).

public Vector<E>

Returns:

TODO
getSelectTables
()

INTERNAL: Returns the table(s) that should be selected to build this mapping's value(s).

public String
getSetMethodName()

PUBLIC: This method is invoked reflectively on the reference object to set the value of the attribute in the object.

public Map<String, List<String>>
getUnconvertedProperties()

INTERNAL: Used to store un-converted properties, which are subsequenctly converted at runtime (through the convertClassNamesToClasses method.

public Object
getValueFromRemoteValueHolder(RemoteValueHolder<T> remoteValueHolder)

INTERNAL: extract and return the appropriate value from the specified remote value holder

public Integer
getWeight()

INTERNAL: Return the weight of the mapping, used to sort mappings to ensure that DirectToField Mappings get merged first

public boolean
hasConstraintDependency()

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

public boolean
hasDependency()

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

public boolean
hasInverseConstraintDependency()

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

public boolean

Returns:

TODO
hasMapsIdValue
()

ADVANCED: Set the mapped by id value

public boolean
hasNestedIdentityReference()

INTERNAL: Indicates whether the mapping (or at least one of its nested mappings, at any nested depth) references an entity.

protected boolean

Returns:

TODO
hasRootExpressionThatShouldUseOuterJoin
(List<E>
TODO
expressions
)

INTERNAL: If there is root expression in the list then indicates whether it shouldUseOuterJoin, otherwise return false.

public boolean

Returns:

TODO
hasUnconvertedProperties
()

INTERNAL: Used to store un-converted properties, which are subsequenctly converted at runtime (through the convertClassNamesToClasses method.

public void
initialize(AbstractSession session)

INTERNAL: Allow for initialization of properties and validation.

public void
instantiateAttribute(Object object, AbstractSession session)

INTERNAL: Trigger the instantiation of the attribute if lazy.

public boolean
public boolean
isAbstractCompositeCollectionMapping()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isAbstractCompositeCollectionMapping.

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

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isAbstractCompositeDirectCollectionMapping.

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

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isAbstractCompositeObjectMapping.

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

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isAbstractDirectMapping.

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

INTERNAL: Related mapping should implement this method to return true.

public boolean
isAggregateMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isAggregateObjectMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isAttributeValueFromObjectInstantiated(Object object)

INTERNAL: Return whether the specified object is instantiated.

public boolean
isCacheable()

Used to signal that this mapping references a protected/isolated entity and requires special merge/object building behaviour.

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.

public boolean
isCascadedLockingSupported()

INTERNAL: Used when determining if a mapping supports cascaded version optimistic locking.

public boolean
isChangeTrackingSupported(Project project)

INTERNAL: Return if this mapping supports change tracking.

public boolean
isCloningRequired()

INTERNAL: Return if this mapping requires its attribute value to be cloned.

public boolean
isCollectionMapping()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isCollectionMapping.

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

INTERNAL:

public boolean
isDirectCollectionMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isDirectMapMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isDirectToFieldMapping()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isDirectToFieldMapping.

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

INTERNAL: Related mapping should implement this method to return true.

public boolean
isEISMapping()

INTERNAL: All EIS mappings should implement this method to return true.

public boolean
isElementCollectionMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isForeignReferenceMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isInAndOutSopObject()

INTERNAL: Indicates whether the mapping is both in and out of SerializedObjectPolicy's sopObject.

public boolean
isInOnlySopObject()

INTERNAL: Indicates whether the mapping is in SerializedObjectPolicy's sopObject and not out of it.

public boolean
isInSopObject()

INTERNAL: Indicates whether the mapping is in SerializedObjectPolicy's sopObject.

public boolean
isJoiningSupported()

INTERNAL: Return if this mapping support joining.

public boolean
isJPAId()

INTERNAL: Flags that this mapping is part of a JPA id mapping.

public boolean
isLazy()

Return if this mapping is lazy.

public boolean
isLockableMapping()

INTERNAL: Return whether this mapping should be traversed when we are locking

public boolean
isManyToManyMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isManyToOneMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean

Returns:

the isMapKeyMapping
isMapKeyMapping
()

public boolean
public boolean
isNestedTableMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isObjectReferenceMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isOneToManyMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isOneToOneMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isOptional()

Return whether the value of this mapping is optional (that is, can be null).

public boolean
isOutOnlySopObject()

INTERNAL: Indicates whether the mapping is out of SerializedObjectPolicy's sopObject and not in it.

public boolean
isOutSopObject()

INTERNAL: Indicates whether the mapping is out of SerializedObjectPolicy's sopObject.

public boolean
isOwned()

Returns true if this mapping is owned by the parent descriptor.

public boolean
isPrimaryKeyMapping()

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

public boolean
isPrivateOwned()

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

public boolean
isReadOnly()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isReadOnly.

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

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isReferenceMapping.

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

INTERNAL: All relational mappings should implement this method to return true.

protected boolean
public boolean
isStructureMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isTransformationMapping()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isTransformationMapping.

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

PUBLIC: Return if method access is used.

public boolean
isVariableOneToOneMapping()

INTERNAL: Related mapping should implement this method to return true.

public boolean
isWriteOnly()

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.isWriteOnly.

INTERNAL: Some mappings support no attribute (transformation and multitenant primary key).
public boolean
isXMLMapping()

INTERNAL: All relational mappings should implement this method to return true.

public abstract void
iterate(DescriptorIterator iterator)

INTERNAL: Iterate on the appropriate attribute value.

public void
iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue)

INTERNAL: Iterate on the attribute value.

public void
load(final Object object, AttributeItem item, final AbstractSession session, final boolean fromFetchGroup)

Force instantiation of the load group.

public void
loadAll(Object object, AbstractSession session, IdentityHashSet loaded)

Force instantiation of all indirections.

public abstract void
mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession)

INTERNAL: Merge changes from the source to the target object.

public abstract void
mergeIntoObject(Object target, boolean isTargetUninitialized, Object source, MergeManager mergeManager, AbstractSession targetSession)

INTERNAL: Merge changes from the source to the target object.

public void
performDataModificationEvent(Object[] event, AbstractSession session)

INTERNAL: Perform the commit event.

public void
postCalculateChanges(ChangeRecord changeRecord, UnitOfWorkImpl uow)

INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated.

public void
postCalculateChangesOnDeleted(Object deletedObject, UnitOfWorkChangeSet uowChangeSet, UnitOfWorkImpl uow)

INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.

public void
postDelete(DeleteObjectQuery query)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
postInitialize(AbstractSession session)

INTERNAL: Allow for initialization of properties and validation that have dependecies no the descriptor being initialized.

public void
postInitializeSourceAndTargetExpressions()

INTERNAL: Mapping callback for post-initialization of source and target expression fields created when a mapping's selectionCriteria is created early with uninitialized fields.

public void
postInsert(WriteObjectQuery query)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
postUpdate(WriteObjectQuery query)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
preDelete(DeleteObjectQuery query)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
preInitialize(AbstractSession session)

INTERNAL: Allow for initialization of properties and validation.

public void
preInsert(WriteObjectQuery query)

INTERNAL: A subclass should implement this method if it wants different behavior.

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.

public void
preUpdate(WriteObjectQuery query)

INTERNAL: A subclass should implement this method if it wants different behavior.

public Object
readFromResultSetIntoObject(ResultSet resultSet, Object targetObject, ObjectBuildingQuery query, AbstractSession session, DatabaseAccessor accessor, ResultSetMetaData metaData, int columnNumber, DatabasePlatform platform)

INTERNAL: Extract values directly from the result-set.

public Object
readFromRowIntoObject(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object targetObject, CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean isTargetProtected)

INTERNAL: Extract value from the row and set the attribute to this value in the object.

public void
readOnly()

PUBLIC: To make mapping read only.

public void
readWrite()

PUBLIC: The mapping can be dynamically made either readOnly or readWriteOnly.

public void
recordPrivateOwnedRemovals(Object object, UnitOfWorkImpl uow)

INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.

public void
rehashFieldDependancies(AbstractSession session)

INTERNAL: Rehash any hashtables based on fields.

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

public Map<K, V>
replaceValueHoldersIn(Object object, RemoteSessionController controller)

INTERNAL: replace the value holders in the specified reference object(s)

public void
setAttributeAccessor(AttributeAccessor
TODO
attributeAccessor
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.setAttributeAccessor.

ADVANCED: Set the attributeAccessor.
public void
setAttributeName(String
TODO
attributeName
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.setAttributeName.

PUBLIC: Sets the name of the attribute in the mapping.
public void
setAttributeValueInObject(Object
TODO
object
,
Object
TODO
value
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.setAttributeValueInObject.

INTERNAL: Set the value of the attribute mapped by this mapping.
public void
setChangeListener(Object clone, PropertyChangeListener listener, UnitOfWorkImpl uow)

INTERNAL: Set the change listener if required.

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

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

public void
setDescriptor(ClassDescriptor
TODO
descriptor
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.setDescriptor.

INTERNAL: Set the descriptor to which this mapping belongs
protected void
setFields(Vector<DatabaseField>
TODO
fields
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.setFields.

INTERNAL: Set the mapping's field collection.
public void
setGetMethodName(String methodName)

PUBLIC: This method is invoked reflectively on the reference object to return the value of the attribute in the object.

public void
setIsCacheable(boolean cacheable)

Used to signal that this mapping references a protected/isolated entity and requires special merge/object building behaviour.

public void
setIsInAndOutSopObject()

INTERNAL: Set the mapping is both in and out of SerializedObjectPolicy's sopObject

public void
setIsInSopObject()

INTERNAL: Set the mapping is in SerializedObjectPolicy's sopObject.

public void
setIsJPAId()

INTERNAL: Flags that this mapping is part of a JPA id mapping.

public void
setIsLazy(boolean isLazy)

Set if this mapping is lazy.

public void
setIsMapKeyMapping(boolean
the isMapKeyMapping to set
isMapKeyMapping
)

public void
setIsOptional(boolean isOptional)

Used to specify whether the value of this mapping may be null.

public void
setIsOutSopObject()

INTERNAL: Set the mapping is out of SerializedObjectPolicy's sopObject.

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.

public void
setIsReadOnly(boolean aBoolean)

PUBLIC: Set this mapping to be read only.

public void
setMapsIdValue(String mapsIdValue)

ADVANCED: Set the maps id value

public void
setProperties(Map<K, V> properties)

INTERNAL: Allow user defined properties.

public void
setProperty(Object property, Object value)

ADVANCED: Allow user defined properties.

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

public void
setSetMethodName(String methodName)

PUBLIC: Set the methodName used to set the value for the mapping's attribute into the object.

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

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

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

public String
toString()

Overrides java.lang.Object.toString.

INTERNAL: Print the mapping attribute name, this is used in error messages.
public 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.

public void
updateCollectionChangeRecord(CollectionChangeEvent event, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow)

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.

public void
validateAfterInitialization(AbstractSession session)

INTERNAL: Allow for subclasses to perform validation.

public void
validateBeforeInitialization(AbstractSession session)

INTERNAL: Allow for subclasses to perform validation.

public Object
valueFromObject(Object
TODO
anObject
,
DatabaseField
TODO
field
,
AbstractSession
TODO
session
)

Implements abstract org.eclipse.persistence.core.mappings.CoreMapping.valueFromObject.

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.
public Object
valueFromResultSet(ResultSet resultSet, ObjectBuildingQuery query, AbstractSession session, DatabaseAccessor accessor, ResultSetMetaData metaData, int columnNumber, DatabasePlatform platform)

INTERNAL: Returns the value for the mapping directly from the result-set.

public Object
valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, boolean isTargetProtected)

INTERNAL: A subclass should implement this method if it wants different behavior.

public Object
valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, CacheKey cacheKey, AbstractSession session, boolean isTargetProtected, Boolean[] wasCacheUsed)

INTERNAL: A subclass should implement this method if it wants different behavior.

public boolean
verifyDelete(Object object, AbstractSession session)

INTERNAL: To verify if the specified object has been deleted or not.

public void
writeFromAttributeIntoRow(Object attribute, AbstractRecord row, AbstractSession session)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord row, AbstractSession session)

INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.

public void
writeFromObjectIntoRowForShallowInsertWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session)

INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.

public void
public void
writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, AbstractRecord databaseRow, AbstractSession session, DatabaseTable table)

INTERNAL: This row is built for update after shallow insert which happens in case of bidirectional inserts.

public void
writeFromObjectIntoRowForUpdateBeforeShallowDelete(Object object, AbstractRecord databaseRow, AbstractSession session, DatabaseTable table)

INTERNAL: This row is built for update before shallow delete which happens in case of bidirectional inserts.

public void
writeFromObjectIntoRowForWhereClause(ObjectLevelModifyQuery query, AbstractRecord row)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType)

INTERNAL: A subclass should implement this method if it wants different behavior.

public void
writeInsertFieldsIntoRow(AbstractRecord databaseRow, AbstractSession session)

INTERNAL: Write fields needed for insert into the template for with null values.

public void
writeUpdateFieldsIntoRow(AbstractRecord databaseRow, AbstractSession session)

INTERNAL: Write fields needed for update into the template for with null values.