public abstract class ForeignReferenceMapping extends DatabaseMapping
DatabaseMapping.WriteType
Modifier and Type | Field 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 |
cascadeDetach |
protected boolean |
cascadeMerge |
protected boolean |
cascadePersist
Cascading flags used by the EntityManager
|
protected boolean |
cascadeRefresh |
protected boolean |
cascadeRemove |
protected boolean |
forceInitializationOfSelectionCriteria
This is a way (after cloning) to force the initialization of the selection criteria
|
protected boolean |
hasCustomSelectionQuery
Indicates whether the selection query is TopLink generated or defined by the user.
|
protected org.eclipse.persistence.internal.indirection.IndirectionPolicy |
indirectionPolicy
Implements indirection behavior
|
static 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 java.lang.String |
mappedBy
Stores JPA metadata about whether another mapping is the owning mapping.
|
static int |
NONE
Specify no join fetch, this is the default.
|
static 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 java.lang.String |
partitioningPolicyName
Allow the mapping's queries to be targeted at specific connection pools.
|
static java.lang.String |
QUERY_BATCH_PARAMETER
Query parameter name used for IN batch ids.
|
protected java.lang.Class |
referenceClass
This is used only in descriptor proxy in remote session
|
protected java.lang.String |
referenceClassName |
protected ClassDescriptor |
referenceDescriptor
The descriptor of the reference class.
|
protected DatabaseMapping |
relationshipPartner
Used to reference the other half of a bi-directional relationship.
|
protected java.lang.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 org.eclipse.persistence.internal.sessions.AbstractSession |
tempInitSession
The session is temporarily used for initialization.
|
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
Modifier | Constructor and Description |
---|---|
protected |
ForeignReferenceMapping() |
Modifier and Type | Method and Description |
---|---|
void |
addForeignKeyField(org.eclipse.persistence.internal.helper.DatabaseField sourceForeignKeyField,
org.eclipse.persistence.internal.helper.DatabaseField targetPrimaryKeyField)
INTERNAL:
Allow subclass to define a foreign key in the source's table.
|
void |
addTargetForeignKeyField(org.eclipse.persistence.internal.helper.DatabaseField targetForeignKeyField,
org.eclipse.persistence.internal.helper.DatabaseField sourcePrimaryKeyField)
INTERNAL:
Allow subclass to define a foreign key in the target's table.
|
protected java.lang.Object |
batchedValueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
ObjectLevelReadQuery query,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey)
INTERNAL:
Retrieve the value through using batch reading.
|
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.
|
abstract java.lang.Object |
buildBackupCloneForPartObject(java.lang.Object attributeValue,
java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
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.
|
void |
buildClone(java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL:
Clone the attribute from the original and assign it to the clone.
|
abstract java.lang.Object |
buildCloneForPartObject(java.lang.Object attributeValue,
java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession,
java.lang.Integer refreshCascade,
boolean isExisting,
boolean isFromSharedCache)
INTERNAL:
Require for cloning, the part must be cloned.
|
void |
buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
A combination of readFromRowIntoObject and buildClone.
|
abstract java.lang.Object[] |
buildReferencesPKList(java.lang.Object entity,
java.lang.Object attribute,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method will access the target relationship and create a list of information to rebuild the relationship.
|
protected java.lang.Object |
checkCacheForBatchKey(org.eclipse.persistence.internal.sessions.AbstractRecord sourceRow,
java.lang.Object foreignKey,
java.util.Map batchObjects,
ReadQuery batchQuery,
ObjectLevelReadQuery originalQuery,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Check if the target object is in the cache if possible based on the source row.
|
java.lang.Object |
clone()
INTERNAL:
The mapping clones itself to create deep copy.
|
abstract void |
collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> cacheFields)
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
|
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.
|
protected abstract boolean |
compareObjectsWithoutPrivateOwned(java.lang.Object first,
java.lang.Object second,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Compare two objects if their parts are not private owned
|
protected abstract boolean |
compareObjectsWithPrivateOwned(java.lang.Object first,
java.lang.Object second,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Compare two objects if their parts are private owned
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings.
|
org.eclipse.persistence.internal.indirection.DatabaseValueHolder |
createCloneValueHolder(ValueHolderInterface attributeValue,
java.lang.Object original,
java.lang.Object clone,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession,
boolean buildDirectlyFromRow)
INTERNAL:
Builder the unit of work value holder.
|
protected boolean |
dontDoMerge(java.lang.Object target,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Return true if the merge should be bypassed.
|
void |
dontUseBatchReading()
PUBLIC:
Indicates whether the referenced object should always be batch read on read all queries.
|
void |
dontUseIndirection()
PUBLIC:
Indirection means that a ValueHolder will be put in-between the attribute and the real object.
|
protected void |
executeBatchQuery(DatabaseQuery query,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
java.util.Map referenceObjectsByKey,
org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.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.
|
void |
extendPessimisticLockScopeInSourceQuery(ObjectLevelReadQuery sourceQuery)
INTERNAL:
Called if shouldExtendPessimisticLockScopeInSourceQuery is true.
|
protected void |
extendPessimisticLockScopeInTargetQuery(ObjectLevelReadQuery targetQuery,
ObjectBuildingQuery sourceQuery)
INTERNAL:
Called if shouldExtendPessimisticLockScopeInTargetQuery() is true.
|
protected java.lang.Object |
extractBatchKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord targetRow,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Extract the batch key value from the source row.
|
java.lang.Object |
extractResultFromBatchQuery(ReadQuery batchQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
org.eclipse.persistence.internal.sessions.AbstractRecord sourceRow,
org.eclipse.persistence.internal.sessions.AbstractSession session,
ObjectLevelReadQuery originalQuery)
INTERNAL:
Extract the value from the batch optimized query, this should be supported by most query types.
|
void |
fixObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
INTERNAL:
An object has been serialized from the server to the client.
|
java.lang.Object |
getAttributeValueFromObject(java.lang.Object object)
INTERNAL:
Return the value of an attribute which this mapping represents for an object.
|
java.lang.Object |
getAttributeValueWithClonedValueHolders(java.lang.Object object)
INTERNAL:
Returns the attribute value from the reference object.
|
BatchFetchType |
getBatchFetchType()
PUBLIC:
Return the type of batch fetching to use for all queries for this class if configured.
|
protected ReadQuery |
getExtendPessimisticLockScopeDedicatedQuery(org.eclipse.persistence.internal.sessions.AbstractSession session,
short lockMode)
INTERNAL:
Should be overridden by subclass that allows setting
extendPessimisticLockScope to DEDICATED_QUERY.
|
java.util.Collection |
getFieldsForTranslationInAggregate()
INTERNAL:
Return source key fields for translation by an AggregateObjectMapping
By default, return an empty NonSynchronizedVector
|
org.eclipse.persistence.internal.indirection.IndirectionPolicy |
getIndirectionPolicy()
INTERNAL:
Return the mapping's indirection policy.
|
Expression |
getJoinCriteria(org.eclipse.persistence.internal.expressions.ObjectExpression context,
Expression base)
INTERNAL:
Returns the join criteria stored in the mapping selection query.
|
int |
getJoinFetch()
PUBLIC:
Return if this relationship should always be join fetched.
|
java.lang.String |
getMappedBy()
ADVANCED: Allows the retrieval of the owning mapping for a particular
mapping.
|
java.lang.Object |
getObjectCorrespondingTo(java.lang.Object object,
DistributedSession 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.List<Expression> |
getOrderByNormalizedExpressions(Expression base)
INTERNAL:
Relationships order by their target primary key fields by default.
|
PartitioningPolicy |
getPartitioningPolicy()
PUBLIC:
Return the mapping's partitioning policy.
|
java.lang.String |
getPartitioningPolicyName()
PUBLIC:
Return the name of the mapping's partitioning policy.
|
java.lang.Object |
getRealAttributeValueFromAttribute(java.lang.Object attributeValue,
java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Returns the attribute value from the reference object.
|
java.lang.Class |
getReferenceClass()
PUBLIC:
Returns the reference class.
|
java.lang.String |
getReferenceClassName()
INTERNAL:
Returns the reference class name.
|
ClassDescriptor |
getReferenceDescriptor()
INTERNAL:
Return the referenceDescriptor.
|
DatabaseMapping |
getRelationshipPartner()
INTERNAL:
Return the relationshipPartner mapping for this bi-directional mapping.
|
java.lang.String |
getRelationshipPartnerAttributeName()
PUBLIC:
Use this method retrieve the relationship partner attribute name of this bidirectional Mapping.
|
Expression |
getSelectionCriteria()
INTERNAL:
Returns the selection criteria stored in the mapping selection query.
|
ReadQuery |
getSelectionQuery()
INTERNAL:
Returns the read query associated with the mapping.
|
protected org.eclipse.persistence.internal.sessions.AbstractSession |
getTempSession() |
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.
|
boolean |
hasCustomSelectionQuery()
INTERNAL:
Indicates whether the selection query is TopLink generated or defined by
the user.
|
boolean |
hasDependency()
INTERNAL:
Return if the mapping has any ownership or other dependency over its target object(s).
|
boolean |
hasNestedIdentityReference()
INTERNAL:
Indicates whether the mapping (or at least one of its nested mappings, at any nested depth)
references an entity.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the state of mapping.
|
protected void |
initializeReferenceDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize and set the descriptor for the referenced class in this mapping.
|
protected void |
initializeSelectionQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
A subclass should implement this method if it wants non default behavior.
|
void |
instantiateAttribute(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Trigger the instantiation of the attribute if lazy.
|
boolean |
isAttributeValueFromObjectInstantiated(java.lang.Object object)
INTERNAL:
Return whether the specified object is instantiated.
|
boolean |
isAttributeValueFullyBuilt(java.lang.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.
|
boolean |
isAttributeValueInstantiated(java.lang.Object object)
INTERNAL:
The referenced object is checked if it is instantiated or not
|
boolean |
isCascadeDetach()
PUBLIC:
Check cascading value for the detach operation.
|
boolean |
isCascadeMerge()
PUBLIC:
Check cascading value for the MERGE operation.
|
boolean |
isCascadeOnDeleteSetOnDatabase()
ADVANCED:
Return if delete cascading has been set on the database for the
mapping's foreign key constraint.
|
boolean |
isCascadePersist()
PUBLIC:
Check cascading value for the CREATE operation.
|
boolean |
isCascadeRefresh()
PUBLIC:
Check cascading value for the REFRESH operation.
|
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.
|
boolean |
isForeignReferenceMapping()
INTERNAL:
|
boolean |
isInnerJoinFetched()
PUBLIC:
Return if this relationship should always be INNER join fetched.
|
boolean |
isJoinFetched()
PUBLIC:
Return if this relationship should always be join fetched.
|
boolean |
isJoiningSupported()
INTERNAL:
Return if this mapping supports joining.
|
boolean |
isLazy()
Return if this mapping is lazy.
|
boolean |
isLockableMapping()
INTERNAL:
Return whether this mapping should be traversed when we are locking.
|
boolean |
isOuterJoinFetched()
PUBLIC:
Return if this relationship should always be OUTER join fetched.
|
boolean |
isPrivateOwned()
PUBLIC:
Return true if referenced objects are privately owned else false.
|
void |
iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL:
Iterate on the iterator's current object's attribute defined by this mapping.
|
abstract void |
iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
java.lang.Object realAttributeValue)
INTERNAL:
Iterate on the attribute value.
|
void |
load(java.lang.Object object,
org.eclipse.persistence.internal.queries.AttributeItem item,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean fromFetchGroup)
Force instantiation of the load group.
|
void |
mergeRemoteValueHolder(java.lang.Object clientSideDomainObject,
java.lang.Object serverSideDomainObject,
org.eclipse.persistence.internal.sessions.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.
|
void |
preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the state of mapping.
|
protected ReadQuery |
prepareHistoricalQuery(ReadQuery targetQuery,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Allow for the mapping to perform any historical query additions.
|
ReadQuery |
prepareNestedBatchQuery(ObjectLevelReadQuery query)
INTERNAL:
Clone and prepare the selection query as a nested batch read query.
|
protected ObjectLevelReadQuery |
prepareNestedJoinQueryClone(org.eclipse.persistence.internal.sessions.AbstractRecord row,
java.util.List dataResults,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Prepare the clone of the nested query for joining.
|
ObjectLevelReadQuery |
prepareNestedJoins(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery baseQuery,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Clone and prepare the JoinedAttributeManager nested JoinedAttributeManager.
|
void |
privateOwnedRelationship()
PUBLIC:
Sets the reference object to be a private owned.
|
java.lang.Object |
readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object targetObject,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected)
INTERNAL:
Extract value from the row and set the attribute to this value in the object.
|
void |
remoteInitialization(DistributedSession session)
INTERNAL:
Once descriptors are serialized to 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)
|
boolean |
requiresTransientWeavedFields()
Returns true if this mappings associated weaved field requires a
transient setting to avoid metadata processing.
|
void |
setBatchFetchType(BatchFetchType batchFetchType)
PUBLIC:
Set the type of batch fetching to use for all queries for this class.
|
void |
setCascadeAll(boolean value)
PUBLIC:
Sets the cascading for all JPA operations.
|
void |
setCascadeDetach(boolean value)
PUBLIC:
Sets the cascading for the JPA detach operation.
|
void |
setCascadeMerge(boolean value)
PUBLIC:
Sets the cascading for the JPA MERGE operation.
|
void |
setCascadePersist(boolean value)
PUBLIC:
Sets the cascading for the JPA CREATE operation.
|
void |
setCascadeRefresh(boolean value)
PUBLIC:
Sets the cascading for the JPA REFRESH operation.
|
void |
setCascadeRemove(boolean value)
PUBLIC:
Sets the cascading for the JPA REMOVE operation.
|
void |
setCustomSelectionQuery(ReadQuery query)
PUBLIC:
Relationship mappings creates a read query to read reference objects.
|
void |
setForceInitializationOfSelectionCriteria(boolean bool)
INTERNAL:
A way of forcing the selection criteria to be rebuilt.
|
protected void |
setHasCustomSelectionQuery(boolean bool) |
void |
setIndirectionPolicy(org.eclipse.persistence.internal.indirection.IndirectionPolicy indirectionPolicy)
ADVANCED:
Set the indirection policy.
|
void |
setIsCacheable(boolean cacheable)
Used to signal that this mapping references a protected/isolated entity and requires
special merge/object building behaviour.
|
void |
setIsCascadeOnDeleteSetOnDatabase(boolean isCascadeOnDeleteSetOnDatabase)
ADVANCED:
Set if delete cascading has been set on the database for the
mapping's foreign key constraint.
|
void |
setIsPrivateOwned(boolean isPrivateOwned)
PUBLIC:
Set if the relationship is privately owned.
|
void |
setJoinFetch(int joinFetch)
PUBLIC:
Indicates whether the referenced object(s) should always be joined on read queries.
|
void |
setMappedBy(java.lang.String mappedBy)
INTERNAL: Called by JPA metadata processing to store the owning mapping
for this mapping
|
void |
setPartitioningPolicy(PartitioningPolicy partitioningPolicy)
PUBLIC:
Set the mapping's partitioning policy.
|
void |
setPartitioningPolicyName(java.lang.String partitioningPolicyName)
PUBLIC:
Set the name of the mapping's partitioning policy.
|
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 |
setReferenceClass(java.lang.Class referenceClass)
PUBLIC:
Set the referenced class.
|
void |
setReferenceClassName(java.lang.String referenceClassName)
INTERNAL:
Used by MW.
|
protected void |
setReferenceDescriptor(ClassDescriptor aDescriptor)
Set the referenceDescriptor.
|
void |
setRelationshipPartner(DatabaseMapping mapping)
INTERNAL:
Sets the relationshipPartner mapping for this bi-directional mapping.
|
void |
setRelationshipPartnerAttributeName(java.lang.String attributeName)
PUBLIC:
Use this method to specify the relationship partner attribute name of a bidirectional Mapping.
|
void |
setRequiresTransientWeavedFields(boolean requiresTransientWeavedFields)
Set this flag if this mappings associated weaved field requires a
transient setting to avoid metadata processing.
|
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.
|
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
|
void |
setSelectionSQLString(java.lang.String sqlString)
PUBLIC:
This is a property on the mapping which will allow custom SQL to be
substituted for reading a reference object.
|
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 |
setTempSession(org.eclipse.persistence.internal.sessions.AbstractSession session) |
void |
setUsesBatchReading(boolean usesBatchReading)
PUBLIC:
Indicates whether the referenced object should always be batch read on read all queries.
|
void |
setUsesIndirection(boolean usesIndirection)
PUBLIC:
Indirection means that a ValueHolder will be put in-between the attribute and the real object.
|
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.
|
boolean |
shouldExtendPessimisticLockScopeInDedicatedQuery() |
boolean |
shouldExtendPessimisticLockScopeInSourceQuery() |
boolean |
shouldExtendPessimisticLockScopeInTargetQuery() |
protected boolean |
shouldForceInitializationOfSelectionCriteria()
INTERNAL:
|
protected boolean |
shouldInitializeSelectionCriteria() |
boolean |
shouldMergeCascadeParts(org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Returns true if the merge should cascade to the mappings reference's parts.
|
protected boolean |
shouldMergeCascadeReference(org.eclipse.persistence.internal.sessions.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.
|
boolean |
shouldRefreshCascadeParts(org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Returns true if the merge should cascade to the mappings reference's parts.
|
boolean |
shouldUseBatchReading()
PUBLIC:
Indicates whether the referenced object should always be batch read on read all queries.
|
protected boolean |
shouldUseValueFromRowWithJoin(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery)
INTERNAL:
Indicates whether valueFromRow should call valueFromRowInternalWithJoin (true)
or valueFromRowInternal (false)
|
org.eclipse.persistence.internal.sessions.AbstractRecord |
trimRowForJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Return a sub-partition of the row starting at the index for the mapping.
|
org.eclipse.persistence.internal.sessions.AbstractRecord |
trimRowForJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row,
java.lang.Object value,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Return a sub-partition of the row starting at the index.
|
abstract void |
updateChangeRecordForSelfMerge(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
java.lang.Object target,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet parentUOWChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL:
Update a ChangeRecord to replace the ChangeSet for the old entity with the changeSet for the new Entity.
|
void |
useBasicIndirection()
PUBLIC:
Indirection means that a ValueHolder will be put in-between the attribute and the real object.
|
void |
useBatchReading()
PUBLIC:
Indicates whether the referenced object should always be batch read on read all queries.
|
void |
useContainerIndirection(java.lang.Class containerClass)
PUBLIC:
Indirection means that a IndirectContainer (wrapping a ValueHolder) will be put in-between the attribute and the real object.
|
void |
useInnerJoinFetch()
PUBLIC:
Specify this relationship to always be join fetched using an INNER join.
|
void |
useOuterJoinFetch()
PUBLIC:
Specify this relationship to always be join fetched using an OUTER join.
|
boolean |
usesIndirection()
PUBLIC:
Indirection means that some sort of indirection object will be put in-between the attribute and the real object.
|
void |
useWeavedIndirection(java.lang.String getMethodName,
java.lang.String setMethodName,
boolean hasUsedMethodAccess)
INTERNAL:
Configures the mapping to used weaved indirection.
|
void |
validateBeforeInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
To validate mappings declaration
|
abstract java.lang.Object |
valueFromPKList(java.lang.Object[] pks,
org.eclipse.persistence.internal.sessions.AbstractRecord foreignKeys,
org.eclipse.persistence.internal.sessions.AbstractSession session)
This method is used to load a relationship from a list of PKs.
|
java.lang.Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
INTERNAL: Return the value of the reference attribute or a value holder.
|
protected java.lang.Object |
valueFromRowInternal(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Return the value of the reference attribute or a value holder.
|
protected java.lang.Object |
valueFromRowInternal(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean shouldUseSopObject)
INTERNAL:
Return the value of the reference attribute or a value holder.
|
protected java.lang.Object |
valueFromRowInternalWithJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected)
INTERNAL:
If the query used joining or partial attributes, build the target object directly.
|
addUnconvertedProperty, buildChangeRecord, buildContainerClone, buildCopy, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cascadeRegisterNewIfRequired, cloneFields, collectFields, compareForChange, convertConverterClassNamesToClasses, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getContainerPolicy, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getProperties, getProperty, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getWeight, hasConstraintDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJPAId, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isReadOnly, isReferenceMapping, isRelationalMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, loadAll, mergeChangesIntoObject, mergeIntoObject, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInitializeSourceAndTargetExpressions, postInsert, postUpdate, preDelete, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remotelyInitialized, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, valueFromObject, valueFromResultSet, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
public static final java.lang.String QUERY_BATCH_PARAMETER
protected java.lang.Class referenceClass
protected java.lang.String referenceClassName
protected transient org.eclipse.persistence.internal.sessions.AbstractSession tempInitSession
protected transient ClassDescriptor referenceDescriptor
protected ReadQuery selectionQuery
protected boolean isPrivateOwned
protected BatchFetchType batchFetchType
protected org.eclipse.persistence.internal.indirection.IndirectionPolicy indirectionPolicy
protected transient boolean hasCustomSelectionQuery
protected DatabaseMapping relationshipPartner
protected java.lang.String relationshipPartnerAttributeName
protected boolean cascadePersist
protected boolean cascadeMerge
protected boolean cascadeRefresh
protected boolean cascadeRemove
protected boolean cascadeDetach
protected boolean requiresTransientWeavedFields
protected int joinFetch
public static final int INNER_JOIN
public static final int OUTER_JOIN
public static final int NONE
protected boolean forceInitializationOfSelectionCriteria
protected boolean isCascadeOnDeleteSetOnDatabase
protected PartitioningPolicy partitioningPolicy
protected java.lang.String partitioningPolicyName
protected java.lang.String mappedBy
public java.lang.String getMappedBy()
public PartitioningPolicy getPartitioningPolicy()
public void setPartitioningPolicy(PartitioningPolicy partitioningPolicy)
public java.lang.String getPartitioningPolicyName()
public void setPartitioningPolicyName(java.lang.String partitioningPolicyName)
protected java.lang.Object batchedValueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, ObjectLevelReadQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey)
public void buildBackupClone(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupClone
in class DatabaseMapping
public abstract java.lang.Object buildBackupCloneForPartObject(java.lang.Object attributeValue, java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupCloneForPartObject
in class DatabaseMapping
public void buildClone(java.lang.Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object clone, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
buildClone
in class DatabaseMapping
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object clone, org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
buildClone assumes the attribute value exists on the original and can simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
buildCloneFromRow
in class DatabaseMapping
public abstract java.lang.Object buildCloneForPartObject(java.lang.Object attributeValue, java.lang.Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object clone, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession, java.lang.Integer refreshCascade, boolean isExisting, boolean isFromSharedCache)
buildCloneForPartObject
in class DatabaseMapping
public java.lang.Object clone()
clone
in class DatabaseMapping
public abstract java.lang.Object[] buildReferencesPKList(java.lang.Object entity, java.lang.Object attribute, org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects
in class DatabaseMapping
protected abstract boolean compareObjectsWithoutPrivateOwned(java.lang.Object first, java.lang.Object second, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected abstract boolean compareObjectsWithPrivateOwned(java.lang.Object first, java.lang.Object second, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses
in class DatabaseMapping
public org.eclipse.persistence.internal.indirection.DatabaseValueHolder createCloneValueHolder(ValueHolderInterface attributeValue, java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession, boolean buildDirectlyFromRow)
createCloneValueHolder
in class DatabaseMapping
buildDirectlyFromRow
- indicates that we are building the clone directly
from a row as opposed to building the original from the row, putting it in
the shared cache, and then cloning the original.protected boolean dontDoMerge(java.lang.Object target, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public void dontUseBatchReading()
public void dontUseIndirection()
protected void extendPessimisticLockScopeInTargetQuery(ObjectLevelReadQuery targetQuery, ObjectBuildingQuery sourceQuery)
public void extendPessimisticLockScopeInSourceQuery(ObjectLevelReadQuery sourceQuery)
public java.lang.Object extractResultFromBatchQuery(ReadQuery batchQuery, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.sessions.AbstractRecord sourceRow, org.eclipse.persistence.internal.sessions.AbstractSession session, ObjectLevelReadQuery originalQuery) throws QueryException
QueryException
protected java.lang.Object extractBatchKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord targetRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
public abstract void collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> cacheFields)
collectQueryParameters
in class DatabaseMapping
protected java.lang.Object checkCacheForBatchKey(org.eclipse.persistence.internal.sessions.AbstractRecord sourceRow, java.lang.Object foreignKey, java.util.Map batchObjects, ReadQuery batchQuery, ObjectLevelReadQuery originalQuery, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void executeBatchQuery(DatabaseQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, java.util.Map referenceObjectsByKey, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord row)
public ObjectLevelReadQuery prepareNestedJoins(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery baseQuery, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)
protected Expression buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query)
public ReadQuery prepareNestedBatchQuery(ObjectLevelReadQuery query)
public void fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
fixObjectReferences
in class DatabaseMapping
public java.lang.Object getAttributeValueFromObject(java.lang.Object object) throws DescriptorException
getAttributeValueFromObject
in class DatabaseMapping
DescriptorException
public java.lang.Object getAttributeValueWithClonedValueHolders(java.lang.Object object)
public java.util.Collection getFieldsForTranslationInAggregate()
protected ReadQuery getExtendPessimisticLockScopeDedicatedQuery(org.eclipse.persistence.internal.sessions.AbstractSession session, short lockMode)
public org.eclipse.persistence.internal.indirection.IndirectionPolicy getIndirectionPolicy()
public boolean isAttributeValueFromObjectInstantiated(java.lang.Object object)
isAttributeValueFromObjectInstantiated
in class DatabaseMapping
public Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.ObjectExpression context, Expression base)
public java.lang.Object getObjectCorrespondingTo(java.lang.Object object, DistributedSession session, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query)
getObjectCorrespondingTo
in class DatabaseMapping
public java.lang.Object getRealAttributeValueFromAttribute(java.lang.Object attributeValue, java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
getRealAttributeValueFromAttribute
in class DatabaseMapping
public boolean isLazy()
isLazy
in class DatabaseMapping
public boolean isLockableMapping()
isLockableMapping
in class DatabaseMapping
public void instantiateAttribute(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
instantiateAttribute
in class DatabaseMapping
public java.lang.Class getReferenceClass()
public java.lang.String getReferenceClassName()
public ClassDescriptor getReferenceDescriptor()
getReferenceDescriptor
in class DatabaseMapping
public DatabaseMapping getRelationshipPartner()
getRelationshipPartner
in class DatabaseMapping
public java.lang.String getRelationshipPartnerAttributeName()
public Expression getSelectionCriteria()
public ReadQuery getSelectionQuery()
protected org.eclipse.persistence.internal.sessions.AbstractSession getTempSession()
public java.lang.Object getValueFromRemoteValueHolder(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
getValueFromRemoteValueHolder
in class DatabaseMapping
public boolean hasCustomSelectionQuery()
public boolean hasNestedIdentityReference()
hasNestedIdentityReference
in class DatabaseMapping
public void preInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
preInitialize
in class DatabaseMapping
DescriptorException
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class DatabaseMapping
DescriptorException
protected void initializeReferenceDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public boolean isAttributeValueFullyBuilt(java.lang.Object object)
object
- IndirectionPolicy.validateAttributeOfInstantiatedObject(Object)
protected void initializeSelectionQuery(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public boolean isAttributeValueInstantiated(java.lang.Object object)
public boolean isCascadeDetach()
public boolean isCascadePersist()
public boolean isCascadeMerge()
public boolean isCascadeRefresh()
public boolean isCascadeRemove()
public boolean hasDependency()
hasDependency
in class DatabaseMapping
public boolean isForeignReferenceMapping()
isForeignReferenceMapping
in class DatabaseMapping
public boolean isJoiningSupported()
isJoiningSupported
in class DatabaseMapping
public boolean isPrivateOwned()
isPrivateOwned
in class DatabaseMapping
public void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
iterate
in class DatabaseMapping
public abstract void iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object realAttributeValue)
iterateOnRealAttributeValue
in class DatabaseMapping
public void load(java.lang.Object object, org.eclipse.persistence.internal.queries.AttributeItem item, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean fromFetchGroup)
load
in class DatabaseMapping
public void mergeRemoteValueHolder(java.lang.Object clientSideDomainObject, java.lang.Object serverSideDomainObject, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public void privateOwnedRelationship()
setIsPrivateOwned(boolean)
public java.lang.Object readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object targetObject, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected) throws DatabaseException
readFromRowIntoObject
in class DatabaseMapping
DatabaseException
public void remoteInitialization(DistributedSession session)
remoteInitialization
in class DatabaseMapping
public java.util.Map replaceValueHoldersIn(java.lang.Object object, org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
replaceValueHoldersIn
in class DatabaseMapping
public boolean requiresTransientWeavedFields()
public void setCascadeAll(boolean value)
public void setCascadeDetach(boolean value)
public void setCascadePersist(boolean value)
public void setCascadeMerge(boolean value)
public void setCascadeRefresh(boolean value)
public void setCascadeRemove(boolean value)
public void setCustomSelectionQuery(ReadQuery query)
protected void setHasCustomSelectionQuery(boolean bool)
public void setForceInitializationOfSelectionCriteria(boolean bool)
public void setIndirectionPolicy(org.eclipse.persistence.internal.indirection.IndirectionPolicy indirectionPolicy)
public void setIsPrivateOwned(boolean isPrivateOwned)
public void setRealAttributeValueInObject(java.lang.Object object, java.lang.Object value) throws DescriptorException
setRealAttributeValueInObject
in class DatabaseMapping
DescriptorException
public void setReferenceClass(java.lang.Class referenceClass)
public void setReferenceClassName(java.lang.String referenceClassName)
protected void setReferenceDescriptor(ClassDescriptor aDescriptor)
public void setRelationshipPartner(DatabaseMapping mapping)
public void setRelationshipPartnerAttributeName(java.lang.String attributeName)
public void setRequiresTransientWeavedFields(boolean requiresTransientWeavedFields)
public void setSelectionCriteria(Expression anExpression)
protected void setSelectionQuery(ReadQuery aQuery)
public void setSelectionSQLString(java.lang.String sqlString)
public void setSelectionCall(Call call)
public void setShouldExtendPessimisticLockScope(boolean shouldExtend)
protected void setTempSession(org.eclipse.persistence.internal.sessions.AbstractSession session)
public void setUsesBatchReading(boolean usesBatchReading)
setBatchFetchType(BatchFetchType)
public void setUsesIndirection(boolean usesIndirection)
useBasicIndirection()
,
dontUseIndirection()
public boolean shouldExtendPessimisticLockScope()
public boolean shouldExtendPessimisticLockScopeInSourceQuery()
public boolean shouldExtendPessimisticLockScopeInTargetQuery()
public boolean shouldExtendPessimisticLockScopeInDedicatedQuery()
protected boolean shouldForceInitializationOfSelectionCriteria()
protected boolean shouldInitializeSelectionCriteria()
public boolean shouldMergeCascadeParts(org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public boolean shouldRefreshCascadeParts(org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
protected boolean shouldMergeCascadeReference(org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
protected boolean shouldObjectModifyCascadeToParts(ObjectLevelModifyQuery query)
public boolean shouldUseBatchReading()
public void useBasicIndirection()
public void useBatchReading()
public void useWeavedIndirection(java.lang.String getMethodName, java.lang.String setMethodName, boolean hasUsedMethodAccess)
getMethodName
- is the name of the original (or weaved in field access case) set method for the mapping.setMethodName
- is the name of the original (or weaved in field access case) set method for the mapping.hasUsedMethodAccess
- indicates whether method or field access was originally used.public void useContainerIndirection(java.lang.Class containerClass)
public boolean usesIndirection()
public abstract void updateChangeRecordForSelfMerge(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, java.lang.Object target, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet parentUOWChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
public void setJoinFetch(int joinFetch)
public int getJoinFetch()
public void setMappedBy(java.lang.String mappedBy)
mappedBy
- public boolean isJoinFetched()
public boolean isInnerJoinFetched()
public boolean isOuterJoinFetched()
public void useInnerJoinFetch()
public void useOuterJoinFetch()
public boolean isCascadeOnDeleteSetOnDatabase()
public void setIsCascadeOnDeleteSetOnDatabase(boolean isCascadeOnDeleteSetOnDatabase)
OneToOne (target foreign key) - deletes target object (private owned)
OneToMany, AggregateCollection - deletes target objects (private owned)
ManyToMany - deletes from join table (only)
DirectCollection - delete from direct table
public void setIsCacheable(boolean cacheable)
setIsCacheable
in class DatabaseMapping
public void validateBeforeInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
validateBeforeInitialization
in class DatabaseMapping
DescriptorException
public abstract java.lang.Object valueFromPKList(java.lang.Object[] pks, org.eclipse.persistence.internal.sessions.AbstractRecord foreignKeys, org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed) throws DatabaseException
valueFromRow
in class DatabaseMapping
DatabaseException
protected boolean shouldUseValueFromRowWithJoin(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery)
protected java.lang.Object valueFromRowInternalWithJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected) throws DatabaseException
DatabaseException
protected java.lang.Object valueFromRowInternal(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession) throws DatabaseException
DatabaseException
protected java.lang.Object valueFromRowInternal(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean shouldUseSopObject) throws DatabaseException
shouldUseSopObject
- indicates whether sopObject stored in the row should be used to extract the value (and fields/values stored in the row ignored).DatabaseException
protected boolean isExtendingPessimisticLockScope(ObjectBuildingQuery sourceQuery)
protected ReadQuery prepareHistoricalQuery(ReadQuery targetQuery, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
public org.eclipse.persistence.internal.sessions.AbstractRecord trimRowForJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
public org.eclipse.persistence.internal.sessions.AbstractRecord trimRowForJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object value, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
protected ObjectLevelReadQuery prepareNestedJoinQueryClone(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.util.List dataResults, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
public BatchFetchType getBatchFetchType()
public void setBatchFetchType(BatchFetchType batchFetchType)
public void addTargetForeignKeyField(org.eclipse.persistence.internal.helper.DatabaseField targetForeignKeyField, org.eclipse.persistence.internal.helper.DatabaseField sourcePrimaryKeyField)
public void addForeignKeyField(org.eclipse.persistence.internal.helper.DatabaseField sourceForeignKeyField, org.eclipse.persistence.internal.helper.DatabaseField targetPrimaryKeyField)
public java.util.List<Expression> getOrderByNormalizedExpressions(Expression base)
getOrderByNormalizedExpressions
in class DatabaseMapping