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

public abstract Class ForeignReferenceMapping

extends DatabaseMapping
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.mappings.ObjectReferenceMapping, org.eclipse.persistence.mappings.CollectionMapping
Imports
java.security.AccessController, .PrivilegedActionException, java.util.ArrayList, .Arrays, .Collection, .HashMap, .HashSet, .Hashtable, .List, .Map, .Set, .Vector, org.eclipse.persistence.annotations.BatchFetchType, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy, org.eclipse.persistence.exceptions.DatabaseException, .DescriptorException, .QueryException, .ValidationException, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.history.AsOfClause, org.eclipse.persistence.indirection.ValueHolder, .ValueHolderInterface, org.eclipse.persistence.internal.descriptors.DescriptorIterator, .InstanceVariableAttributeAccessor, .MethodAttributeAccessor, org.eclipse.persistence.internal.expressions.ForUpdateOfClause, .ObjectExpression, org.eclipse.persistence.internal.helper.ClassConstants, .DatabaseField, .Helper, .NonSynchronizedSubVector, .NonSynchronizedVector, org.eclipse.persistence.internal.identitymaps.CacheId, .CacheKey, org.eclipse.persistence.internal.indirection.BasicIndirectionPolicy, .ContainerIndirectionPolicy, .DatabaseValueHolder, .IndirectionPolicy, .NoIndirectionPolicy, .WeavedObjectBasicIndirectionPolicy, org.eclipse.persistence.internal.queries.AttributeItem, .JoinedAttributeManager, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .ChangeRecord, .MergeManager, .UnitOfWorkChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.internal.sessions.remote.ObjectDescriptor, .RemoteSessionController, .RemoteValueHolder, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.queries.BatchFetchPolicy, .Call, .DatabaseQuery, .FetchGroup, .ObjectBuildingQuery, .ObjectLevelModifyQuery, .ObjectLevelReadQuery, .ReadAllQuery, .ReadObjectQuery, .ReadQuery, .ReportQuery, org.eclipse.persistence.sessions.DatabaseRecord, org.eclipse.persistence.sessions.remote.DistributedSession

Purpose: Abstract class for relationship mappings

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum
ForeignReferenceMapping.ExtendPessimisticLockScope

Indicates whether and how pessimistic lock scope should be extended

Field Summary

Modifier and TypeField and Description
protected BatchFetchType
batchFetchType

Indicates whether the referenced object should always be batch read on read all queries, and defines the type of batch fetch to use.

protected boolean
protected boolean
protected boolean
cascadePersist

Cascading flags used by the EntityManager

protected boolean
protected boolean
pack-priv ForeignReferenceMapping.ExtendPessimisticLockScope
protected boolean
forceInitializationOfSelectionCriteria

This is a way (after cloning) to force the initialization of the selection criteria

protected transient boolean
hasCustomSelectionQuery

Indicates whether the selection query is TopLink generated or defined by the user.

protected IndirectionPolicy
indirectionPolicy

Implements indirection behavior

public static final int
INNER_JOIN

Specify any INNER join on a join fetch.

protected boolean
isCascadeOnDeleteSetOnDatabase

Support delete cascading on the database relationship constraint.

protected boolean
isPrivateOwned

Indicates whether the referenced object is privately owned or not.

protected int
joinFetch

Define if the relationship should always be join fetched.

protected String
mappedBy

Stores JPA metadata about whether another mapping is the owning mapping.

public static final int
NONE

Specify no join fetch, this is the default.

public static final int
OUTER_JOIN

Specify any OUTER join on a join fetch.

protected PartitioningPolicy
partitioningPolicy

Allow the mapping's queries to be targeted at specific connection pools.

protected String
partitioningPolicyName

Allow the mapping's queries to be targeted at specific connection pools.

public static final String
QUERY_BATCH_PARAMETER

Query parameter name used for IN batch ids.

protected Class<?>
referenceClass

This is used only in descriptor proxy in remote session

protected String
protected transient ClassDescriptor
referenceDescriptor

The descriptor of the reference class.

protected DatabaseMapping
relationshipPartner

Used to reference the other half of a bi-directional relationship.

protected String
relationshipPartnerAttributeName

Set by users, used to retrieve the backpointer for this mapping

protected boolean
requiresTransientWeavedFields

Flag used to determine if we need to weave the transient annotation on weaved fields.

protected ReadQuery
selectionQuery

This query is used to read referenced objects for this mapping.

protected transient AbstractSession
tempInitSession

The session is temporarily used for initialization.

Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
attributeAccessorattributeNamederivedIdMappingderivesIddescriptorfieldsisCacheableisInSopObjectisJPAIdisLazyisMapKeyMappingisOptionalisPrimaryKeyMappingisReadOnlyisRemotelyInitializedmapsIdValueNO_FIELDSNO_WEIGHTpropertiesunconvertedPropertiesweightWEIGHT_AGGREGATEWEIGHT_DIRECTWEIGHT_TO_ONEWEIGHT_TRANSFORM

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
addForeignKeyField(DatabaseField sourceForeignKeyField, DatabaseField targetPrimaryKeyField)

INTERNAL: Allow subclass to define a foreign key in the source's table.

public void
addTargetForeignKeyField(DatabaseField targetForeignKeyField, DatabaseField sourcePrimaryKeyField)

INTERNAL: Allow subclass to define a foreign key in the target's table.

protected Object
batchedValueFromRow(AbstractRecord row, ObjectLevelReadQuery query, CacheKey parentCacheKey)

INTERNAL: Retrieve the value through using batch reading.

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

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.buildBackupClone.

INTERNAL: Clone the attribute from the clone and assign it to the backup.
public abstract Object
buildBackupCloneForPartObject(Object
TODO
attributeValue
,
Object
TODO
clone
,
Object
TODO
backup
,
UnitOfWorkImpl
TODO
unitOfWork
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.buildBackupCloneForPartObject.

INTERNAL: Used during building the backup shallow copy to copy the target object without re-registering it.
protected Expression
buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query)

INTERNAL: Return the selection criteria used to IN batch fetching.

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

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.buildClone.

INTERNAL: Clone the attribute from the original and assign it to the clone.
public abstract Object
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
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.buildCloneForPartObject.

INTERNAL: Require for cloning, the part must be cloned.
public void
buildCloneFromRow(AbstractRecord
TODO
databaseRow
,
JoinedAttributeManager
TODO
joinManager
,
Object
TODO
clone
,
CacheKey
TODO
sharedCacheKey
,
ObjectBuildingQuery
TODO
sourceQuery
,
UnitOfWorkImpl
TODO
unitOfWork
,
AbstractSession
TODO
executionSession
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.buildCloneFromRow.

INTERNAL: A combination of readFromRowIntoObject and buildClone.
public abstract Object[]
buildReferencesPKList(Object entity, Object attribute, AbstractSession session)

INTERNAL: This method will access the target relationship and create a list of information to rebuild the relationship.

protected Object
checkCacheForBatchKey(AbstractRecord sourceRow, Object foreignKey, Map<K, V> batchObjects, ReadQuery batchQuery, ObjectLevelReadQuery originalQuery, AbstractSession session)

INTERNAL: Check if the target object is in the cache if possible based on the source row.

public Object
clone()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.clone.

INTERNAL: The mapping clones itself to create deep copy.
public abstract void
collectQueryParameters(Set<DatabaseField>
TODO
cacheFields
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.collectQueryParameters.

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 boolean
compareObjects(Object
TODO
firstObject
,
Object
TODO
secondObject
,
AbstractSession
TODO
session
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.compareObjects.

INTERNAL: Compare the attributes belonging to this mapping for the objects.
protected abstract boolean
compareObjectsWithoutPrivateOwned(Object first, Object second, AbstractSession session)

Compare two objects if their parts are not private owned

protected abstract boolean
compareObjectsWithPrivateOwned(Object first, Object second, AbstractSession session)

Compare two objects if their parts are private owned

public void
convertClassNamesToClasses(ClassLoader
TODO
classLoader
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.
public <T> DatabaseValueHolder<T>
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
buildDirectlyFromRow
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.createCloneValueHolder.

INTERNAL: Builder the unit of work value holder.
protected boolean
dontDoMerge(Object target, Object source, MergeManager mergeManager)

INTERNAL: Return true if the merge should be bypassed.

public void
dontUseBatchReading()

PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.

public void
dontUseIndirection()

PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object.

protected void
executeBatchQuery(DatabaseQuery query, CacheKey parentCacheKey, Map<K, V> referenceObjectsByKey, AbstractSession session, AbstractRecord row)

INTERNAL: Prepare and execute the batch query and store the results for each source object in a map keyed by the mappings source keys of the source objects.

public void
extendPessimisticLockScopeInSourceQuery(ObjectLevelReadQuery sourceQuery)

INTERNAL: Called if shouldExtendPessimisticLockScopeInSourceQuery is true.

protected void
extendPessimisticLockScopeInTargetQuery(ObjectLevelReadQuery targetQuery, ObjectBuildingQuery sourceQuery)

INTERNAL: Called if shouldExtendPessimisticLockScopeInTargetQuery() is true.

protected Object
extractBatchKeyFromRow(AbstractRecord targetRow, AbstractSession session)

INTERNAL: Extract the batch key value from the source row.

public Object
extractResultFromBatchQuery(ReadQuery batchQuery, CacheKey parentCacheKey, AbstractRecord sourceRow, AbstractSession session, ObjectLevelReadQuery originalQuery)

INTERNAL: Extract the value from the batch optimized query, this should be supported by most query types.

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

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.fixObjectReferences.

INTERNAL: An object has been serialized from the server to the client.
public Object
getAttributeValueFromObject(Object
TODO
object
)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getAttributeValueFromObject.

INTERNAL: Return the value of an attribute which this mapping represents for an object.
public Object
getAttributeValueWithClonedValueHolders(Object object)

INTERNAL: Returns the attribute value from the reference object.

public BatchFetchType
getBatchFetchType()

PUBLIC: Return the type of batch fetching to use for all queries for this class if configured.

protected ReadQuery
getExtendPessimisticLockScopeDedicatedQuery(AbstractSession session, short lockMode)

INTERNAL: Should be overridden by subclass that allows setting extendPessimisticLockScope to DEDICATED_QUERY.

public Collection<E>
getFieldsForTranslationInAggregate()

INTERNAL: Return source key fields for translation by an AggregateObjectMapping By default, return an empty NonSynchronizedVector

public IndirectionPolicy
getIndirectionPolicy()

INTERNAL: Return the mapping's indirection policy.

public Expression
getJoinCriteria(ObjectExpression context, Expression base)

INTERNAL: Returns the join criteria stored in the mapping selection query.

public int
getJoinFetch()

PUBLIC: Return if this relationship should always be join fetched.

public String
getMappedBy()

ADVANCED: Allows the retrieval of the owning mapping for a particular mapping.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getObjectCorrespondingTo.

INTERNAL: return the object on the client corresponding to the specified object.
public List<Expression>
getOrderByNormalizedExpressions(Expression base)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getOrderByNormalizedExpressions.

INTERNAL: Relationships order by their target primary key fields by default.
public PartitioningPolicy
getPartitioningPolicy()

PUBLIC: Return the mapping's partitioning policy.

public String
getPartitioningPolicyName()

PUBLIC: Return the name of the mapping's partitioning policy.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getRealAttributeValueFromAttribute.

INTERNAL: Returns the attribute value from the reference object.
public Class<?>
getReferenceClass()

PUBLIC: Returns the reference class.

public String
getReferenceClassName()

INTERNAL: Returns the reference class name.

public ClassDescriptor
public DatabaseMapping
getRelationshipPartner()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getRelationshipPartner.

INTERNAL: Return the relationshipPartner mapping for this bi-directional mapping.
public String
getRelationshipPartnerAttributeName()

PUBLIC: Use this method retrieve the relationship partner attribute name of this bidirectional Mapping.

public Expression
getSelectionCriteria()

INTERNAL: Returns the selection criteria stored in the mapping selection query.

public ReadQuery
getSelectionQuery()

INTERNAL: Returns the read query associated with the mapping.

protected AbstractSession
public Object
getValueFromRemoteValueHolder(RemoteValueHolder<T> remoteValueHolder)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getValueFromRemoteValueHolder.

INTERNAL: Extract and return the appropriate value from the specified remote value holder.
public boolean
hasCustomSelectionQuery()

INTERNAL: Indicates whether the selection query is TopLink generated or defined by the user.

public boolean
hasDependency()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.hasDependency.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.hasNestedIdentityReference.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.initialize.

INTERNAL: Initialize the state of mapping.
protected void
initializeReferenceDescriptor(AbstractSession session)

Initialize and set the descriptor for the referenced class in this mapping.

protected void
initializeSelectionQuery(AbstractSession session)

A subclass should implement this method if it wants non default behavior.

public void
instantiateAttribute(Object object, AbstractSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.instantiateAttribute.

INTERNAL: Trigger the instantiation of the attribute if lazy.
public boolean
public boolean
isAttributeValueFullyBuilt(Object object)

INTERNAL: The method validateAttributeOfInstantiatedObject(Object attributeValue) fixes the value of the attributeValue in cases where it is null and indirection requires that it contain some specific data structure.

public boolean
isAttributeValueInstantiated(Object object)

INTERNAL: The referenced object is checked if it is instantiated or not

public boolean
isCascadeDetach()

PUBLIC: Check cascading value for the detach operation.

public boolean
isCascadeMerge()

PUBLIC: Check cascading value for the MERGE operation.

public boolean
isCascadeOnDeleteSetOnDatabase()

ADVANCED: Return if delete cascading has been set on the database for the mapping's foreign key constraint.

public boolean
isCascadePersist()

PUBLIC: Check cascading value for the CREATE operation.

public boolean
isCascadeRefresh()

PUBLIC: Check cascading value for the REFRESH operation.

public boolean
isCascadeRemove()

PUBLIC: Check cascading value for the REMOVE operation.

protected boolean
isExtendingPessimisticLockScope(ObjectBuildingQuery sourceQuery)

INTERNAL: Indicates whether the source query's pessimistic lock scope scope should be extended in the target query.

public boolean
public boolean
isInnerJoinFetched()

PUBLIC: Return if this relationship should always be INNER join fetched.

public boolean
isJoinFetched()

PUBLIC: Return if this relationship should always be join fetched.

public boolean
isJoiningSupported()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isJoiningSupported.

INTERNAL: Return if this mapping supports joining.
public boolean
isLazy()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isLazy.

Return if this mapping is lazy.
public boolean
isLockableMapping()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isLockableMapping.

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

PUBLIC: Return if this relationship should always be OUTER join fetched.

public boolean
isPrivateOwned()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isPrivateOwned.

PUBLIC: Return true if referenced objects are privately owned else false.
public void
iterate(DescriptorIterator iterator)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.iterate.

INTERNAL: Iterate on the iterator's current object's attribute defined by this mapping.
public abstract void
iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.iterateOnRealAttributeValue.

INTERNAL: Iterate on the attribute value.
public void
load(final Object object, AttributeItem item, final AbstractSession session, final boolean fromFetchGroup)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.load.

Force instantiation of the load group.
public void
mergeRemoteValueHolder(Object clientSideDomainObject, Object serverSideDomainObject, MergeManager mergeManager)

INTERNAL: Replace the client value holder with the server value holder, after copying some of the settings from the client value holder.

protected void
postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)

INTERNAL: Allow the mapping the do any further batch preparation.

public void
preInitialize(AbstractSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.preInitialize.

INTERNAL: Initialize the state of mapping.
protected ReadQuery
prepareHistoricalQuery(ReadQuery targetQuery, ObjectBuildingQuery sourceQuery, AbstractSession executionSession)

INTERNAL: Allow for the mapping to perform any historical query additions.

public ReadQuery
prepareNestedBatchQuery(ObjectLevelReadQuery query)

INTERNAL: Clone and prepare the selection query as a nested batch read query.

protected ObjectLevelReadQuery
prepareNestedJoinQueryClone(AbstractRecord row, List<E> dataResults, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession)

INTERNAL: Prepare the clone of the nested query for joining.

public ObjectLevelReadQuery
prepareNestedJoins(JoinedAttributeManager joinManager, ObjectBuildingQuery baseQuery, AbstractSession session)

INTERNAL: Clone and prepare the JoinedAttributeManager nested JoinedAttributeManager.

public void
privateOwnedRelationship()

PUBLIC: Sets the reference object to be a private owned.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject.

INTERNAL: Extract value from the row and set the attribute to this value in the object.
public void
remoteInitialization(DistributedSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.remoteInitialization.

INTERNAL: Once descriptors are serialized to the remote session.
public Map<K, V>
replaceValueHoldersIn(Object object, RemoteSessionController controller)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.replaceValueHoldersIn.

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

Returns true if this mappings associated weaved field requires a transient setting to avoid metadata processing.

public void
setBatchFetchType(BatchFetchType batchFetchType)

PUBLIC: Set the type of batch fetching to use for all queries for this class.

public void
setCascadeAll(boolean value)

PUBLIC: Sets the cascading for all JPA operations.

public void
setCascadeDetach(boolean value)

PUBLIC: Sets the cascading for the JPA detach operation.

public void
setCascadeMerge(boolean value)

PUBLIC: Sets the cascading for the JPA MERGE operation.

public void
setCascadePersist(boolean value)

PUBLIC: Sets the cascading for the JPA CREATE operation.

public void
setCascadeRefresh(boolean value)

PUBLIC: Sets the cascading for the JPA REFRESH operation.

public void
setCascadeRemove(boolean value)

PUBLIC: Sets the cascading for the JPA REMOVE operation.

public void
setCustomSelectionQuery(ReadQuery query)

PUBLIC: Relationship mappings creates a read query to read reference objects.

public void
setForceInitializationOfSelectionCriteria(boolean bool)

INTERNAL: A way of forcing the selection criteria to be rebuilt.

protected void
public void
setIndirectionPolicy(IndirectionPolicy indirectionPolicy)

ADVANCED: Set the indirection policy.

public void
setIsCacheable(boolean cacheable)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.setIsCacheable.

Used to signal that this mapping references a protected/isolated entity and requires special merge/object building behaviour.
public void
setIsCascadeOnDeleteSetOnDatabase(boolean isCascadeOnDeleteSetOnDatabase)

ADVANCED: Set if delete cascading has been set on the database for the mapping's foreign key constraint.

public void
setIsPrivateOwned(boolean isPrivateOwned)

PUBLIC: Set if the relationship is privately owned.

public void
setJoinFetch(int joinFetch)

PUBLIC: Indicates whether the referenced object(s) should always be joined on read queries.

public void
setMappedBy(String mappedBy)

INTERNAL: Called by JPA metadata processing to store the owning mapping for this mapping

public void
setPartitioningPolicy(PartitioningPolicy partitioningPolicy)

PUBLIC: Set the mapping's partitioning policy.

public void
setPartitioningPolicyName(String partitioningPolicyName)

PUBLIC: Set the name of the mapping's partitioning policy.

public void
setRealAttributeValueInObject(Object object, Object value)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.setRealAttributeValueInObject.

INTERNAL: Set the value of the attribute mapped by this mapping, placing it inside a value holder if necessary.
public void
setReferenceClass(Class<?> referenceClass)

PUBLIC: Set the referenced class.

public void
setReferenceClassName(String referenceClassName)

INTERNAL: Used by MW.

protected void
setReferenceDescriptor(ClassDescriptor aDescriptor)

Set the referenceDescriptor.

public void
setRelationshipPartner(DatabaseMapping mapping)

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

public void
setRelationshipPartnerAttributeName(String attributeName)

PUBLIC: Use this method to specify the relationship partner attribute name of a bidirectional Mapping.

public void
setRequiresTransientWeavedFields(boolean requiresTransientWeavedFields)

Set this flag if this mappings associated weaved field requires a transient setting to avoid metadata processing.

public void
setSelectionCall(Call call)

PUBLIC: This is a property on the mapping which will allow custom call to be substituted for reading a reference object.

public void
setSelectionCriteria(Expression anExpression)

PUBLIC: Sets the selection criteria to be used as a where clause to read reference objects.

protected void
setSelectionQuery(ReadQuery aQuery)

Sets the query

public void
setSelectionSQLString(String sqlString)

PUBLIC: This is a property on the mapping which will allow custom SQL to be substituted for reading a reference object.

public void
setShouldExtendPessimisticLockScope(boolean shouldExtend)

ADVANCED: Indicates whether pessimistic lock of ObjectLevelReadQuery with isPessimisticLockScopeExtended set to true should be applied through this mapping beyond the tables mapped to the source object.

protected void
public void
setUsesBatchReading(boolean usesBatchReading)

PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.

public void
setUsesIndirection(boolean usesIndirection)

PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object.

public boolean
shouldExtendPessimisticLockScope()

INTERNAL: Indicates whether pessimistic lock of ObjectLevelReadQuery with isPessimisticLockScopeExtended set to true should be applied through this mapping beyond the tables mapped to the source object.

public boolean
public boolean
public boolean
protected boolean
protected boolean
public boolean
shouldMergeCascadeParts(MergeManager mergeManager)

INTERNAL: Returns true if the merge should cascade to the mappings reference's parts.

protected boolean
shouldMergeCascadeReference(MergeManager mergeManager)

Returns true if the merge should cascade to the mappings reference.

protected boolean
shouldObjectModifyCascadeToParts(ObjectLevelModifyQuery query)

Returns true if any process leading to object modification should also affect its parts Usually used by write, insert, update and delete.

public boolean
shouldRefreshCascadeParts(MergeManager mergeManager)

INTERNAL: Returns true if the merge should cascade to the mappings reference's parts.

public boolean
shouldUseBatchReading()

PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.

protected boolean
shouldUseValueFromRowWithJoin(JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery)

INTERNAL: Indicates whether valueFromRow should call valueFromRowInternalWithJoin (true) or valueFromRowInternal (false)

public AbstractRecord
trimRowForJoin(AbstractRecord row, JoinedAttributeManager joinManager, AbstractSession executionSession)

INTERNAL: Return a sub-partition of the row starting at the index for the mapping.

public AbstractRecord
trimRowForJoin(AbstractRecord row, Object value, AbstractSession executionSession)

INTERNAL: Return a sub-partition of the row starting at the index.

public abstract void
updateChangeRecordForSelfMerge(ChangeRecord changeRecord, Object source, Object target, UnitOfWorkChangeSet parentUOWChangeSet, UnitOfWorkImpl unitOfWork)

INTERNAL: Update a ChangeRecord to replace the ChangeSet for the old entity with the changeSet for the new Entity.

public void
useBasicIndirection()

PUBLIC: Indirection means that a ValueHolder will be put in-between the attribute and the real object.

public void
useBatchReading()

PUBLIC: Indicates whether the referenced object should always be batch read on read all queries.

public void
useContainerIndirection(Class<?> containerClass)

PUBLIC: Indirection means that a IndirectContainer (wrapping a ValueHolder) will be put in-between the attribute and the real object.

public void
useInnerJoinFetch()

PUBLIC: Specify this relationship to always be join fetched using an INNER join.

public void
useOuterJoinFetch()

PUBLIC: Specify this relationship to always be join fetched using an OUTER join.

public boolean
usesIndirection()

PUBLIC: Indirection means that some sort of indirection object will be put in-between the attribute and the real object.

public void
useWeavedIndirection(String
is the name of the original (or weaved in field access case) set method for the mapping.
getMethodName
,
String
is the name of the original (or weaved in field access case) set method for the mapping.
setMethodName
,
boolean
indicates whether method or field access was originally used.
hasUsedMethodAccess
)

INTERNAL: Configures the mapping to used weaved indirection.

public void
public abstract Object
valueFromPKList(Object[] pks, AbstractRecord foreignKeys, AbstractSession session)

This method is used to load a relationship from a list of PKs.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.valueFromRow.

INTERNAL: Return the value of the reference attribute or a value holder.
protected Object
valueFromRowInternal(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession)

INTERNAL: Return the value of the reference attribute or a value holder.

protected Object
valueFromRowInternal(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean
indicates whether sopObject stored in the row should be used to extract the value (and fields/values stored in the row ignored).
shouldUseSopObject
)

INTERNAL: Return the value of the reference attribute or a value holder.

protected Object
valueFromRowInternalWithJoin(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey parentCacheKey, AbstractSession executionSession, boolean isTargetProtected)

INTERNAL: If the query used joining or partial attributes, build the target object directly.

Inherited from org.eclipse.persistence.mappings.DatabaseMapping:
addUnconvertedPropertybuildChangeRecordbuildContainerClonebuildCopybuildExpressionbuildObjectJoinExpressionbuildObjectJoinExpressionbuildShallowOriginalFromRowcalculateDeferredChangescascadeDiscoverAndPersistUnregisteredNewObjectscascadePerformRemoveIfRequiredcascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequiredcascadeRegisterNewIfRequiredcloneFieldscollectFieldscompareForChangeconvertConverterClassNamesToClassesderivesIdearlyPreDeleteextractNestedExpressionsextractNestedNonAggregateExpressionsfixRealObjectReferencesgetAttributeAccessorgetAttributeClassificationgetAttributeNamegetContainerPolicygetDerivedIdMappinggetDescriptorgetFieldgetFieldClassificationgetFieldsgetGetMethodNamegetMapsIdValuegetPropertiesgetPropertygetRealAttributeValueFromObjectgetRealCollectionAttributeValueFromObjectgetSelectFieldsgetSelectTablesgetSetMethodNamegetUnconvertedPropertiesgetWeighthasConstraintDependencyhasInverseConstraintDependencyhasMapsIdValuehasRootExpressionThatShouldUseOuterJoinhasUnconvertedPropertiesisAbstractColumnMappingisAbstractCompositeCollectionMappingisAbstractCompositeDirectCollectionMappingisAbstractCompositeObjectMappingisAbstractDirectMappingisAggregateCollectionMappingisAggregateMappingisAggregateObjectMappingisCacheableisCandidateForPrivateOwnedRemovalisCascadedLockingSupportedisChangeTrackingSupportedisCloningRequiredisCollectionMappingisDatabaseMappingisDirectCollectionMappingisDirectMapMappingisDirectToFieldMappingisDirectToXMLTypeMappingisEISMappingisElementCollectionMappingisInAndOutSopObjectisInOnlySopObjectisInSopObjectisJPAIdisManyToManyMappingisManyToOneMappingisMapKeyMappingisMultitenantPrimaryKeyMappingisNestedTableMappingisObjectReferenceMappingisOneToManyMappingisOneToOneMappingisOptionalisOutOnlySopObjectisOutSopObjectisOwnedisPrimaryKeyMappingisReadOnlyisReferenceMappingisRelationalMappingisRemotelyInitializedisStructureMappingisTransformationMappingisUnidirectionalOneToManyMappingisUsingMethodAccessisVariableOneToOneMappingisWriteOnlyisXMLMappingloadAllmergeChangesIntoObjectmergeIntoObjectperformDataModificationEventpostCalculateChangespostCalculateChangesOnDeletedpostDeletepostInitializepostInitializeSourceAndTargetExpressionspostInsertpostUpdatepreDeletepreInsertprepareCascadeLockingPolicypreUpdatereadFromResultSetIntoObjectreadOnlyreadWriterecordPrivateOwnedRemovalsrehashFieldDependanciesremotelyInitializedsetAttributeAccessorsetAttributeNamesetAttributeValueInObjectsetChangeListenersetDerivedIdMappingsetDerivesIdsetDescriptorsetFieldssetGetMethodNamesetIsInAndOutSopObjectsetIsInSopObjectsetIsJPAIdsetIsLazysetIsMapKeyMappingsetIsOptionalsetIsOutSopObjectsetIsPrimaryKeyMappingsetIsReadOnlysetMapsIdValuesetPropertiessetPropertysetSetMethodNamesetWeightsimpleAddToCollectionChangeRecordsimpleRemoveFromCollectionChangeRecordtoStringupdateChangeRecordupdateCollectionChangeRecordvalidateAfterInitializationvalueFromObjectvalueFromResultSetvalueFromRowverifyDeletewriteFromAttributeIntoRowwriteFromObjectIntoRowwriteFromObjectIntoRowForShallowInsertwriteFromObjectIntoRowForShallowInsertWithChangeRecordwriteFromObjectIntoRowForUpdatewriteFromObjectIntoRowForUpdateAfterShallowInsertwriteFromObjectIntoRowForUpdateBeforeShallowDeletewriteFromObjectIntoRowForWhereClausewriteFromObjectIntoRowWithChangeRecordwriteInsertFieldsIntoRowwriteUpdateFieldsIntoRow