public abstract class CollectionMapping extends ForeignReferenceMapping implements ContainerMapping
Purpose: Abstract class for relationship mappings which store collection of objects
DatabaseMapping.WriteType| Modifier and Type | Field and Description |
|---|---|
protected DataModifyQuery |
changeOrderTargetQuery
Query used when order of list members is changed.
|
protected org.eclipse.persistence.internal.queries.ContainerPolicy |
containerPolicy |
protected ModifyQuery |
deleteAllQuery
Used for delete all in m-m, dc and delete all optimization in 1-m.
|
protected boolean |
hasCustomDeleteAllQuery |
protected boolean |
hasOrderBy |
protected boolean |
isListOrderFieldSupported
Indicates whether the mapping supports listOrderField, if it doesn't attempt to set listOrderField throws exception.
|
protected static boolean |
isSynchronizeOnMerge
Flag to indicate if collection needs to be synchronized instead of cloning during merge.
|
protected org.eclipse.persistence.internal.helper.DatabaseField |
listOrderField
Field holds the order of elements in the list in the db, requires collection of type List, may be not null only in case isListOrderFieldSupported==true
|
protected java.lang.Boolean |
mustDeleteReferenceObjectsOneByOne
Store if the mapping can batch delete reference objects.
|
protected OrderCorrectionType |
orderCorrectionType
Specifies what should be done if the list of values read from listOrserField is invalid
(there should be no nulls, no duplicates, no "holes").
|
batchFetchType, cascadeDetach, cascadeMerge, cascadePersist, cascadeRefresh, cascadeRemove, forceInitializationOfSelectionCriteria, hasCustomSelectionQuery, indirectionPolicy, INNER_JOIN, isCascadeOnDeleteSetOnDatabase, isPrivateOwned, joinFetch, mappedBy, NONE, OUTER_JOIN, partitioningPolicy, partitioningPolicyName, QUERY_BATCH_PARAMETER, referenceClass, referenceClassName, referenceDescriptor, relationshipPartner, relationshipPartnerAttributeName, requiresTransientWeavedFields, selectionQuery, tempInitSessionattributeAccessor, 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| Constructor and Description |
|---|
CollectionMapping()
PUBLIC:
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAggregateOrderBy(java.lang.String aggregateName,
java.lang.String queryKeyName,
boolean isDescending)
PUBLIC:
Provide order support for queryKeyName in ascending or descending order.
|
void |
addAscendingOrdering(java.lang.String queryKeyName)
PUBLIC:
Provide order support for queryKeyName in ascending order
|
void |
addDescendingOrdering(java.lang.String queryKeyName)
PUBLIC:
Provide order support for queryKeyName in descending order.
|
void |
addOrderBy(java.lang.String queryKeyName,
boolean isDescending)
PUBLIC:
Provide order support for queryKeyName in descending or ascending order.
|
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 vector without re-registering the target objects.
|
org.eclipse.persistence.internal.sessions.ChangeRecord |
buildChangeRecord(java.lang.Object clone,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Directly build a change record without comparison
|
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.
|
java.lang.Object |
buildContainerClone(java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL:
Performs a first level clone of the attribute.
|
void |
buildCopy(java.lang.Object copy,
java.lang.Object original,
CopyGroup group)
INTERNAL:
Copy of the attribute of the object.
|
java.lang.Object |
buildElementClone(java.lang.Object element,
java.lang.Object parent,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession,
boolean isExisting,
boolean isFromSharedCache)
INTERNAL:
Clone the element, if necessary.
|
java.lang.Object |
buildElementUnitOfWorkClone(java.lang.Object element,
java.lang.Object parent,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
boolean isExisting,
boolean isFromSharedCache)
INTERNAL:
Clone the element, if necessary.
|
Expression |
buildExpression(java.lang.Object queryObject,
QueryByExamplePolicy policy,
Expression expressionBuilder,
java.util.Map processedObjects,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
In case Query By Example is used, this method generates an expression from a attribute value pair.
|
protected void |
buildListOrderField()
INTERNAL:
Verifies listOrderField's table, if none found sets the default one.
|
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.
|
void |
calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes
as apposed to detected changes.
|
void |
cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object,
java.util.Map newObjects,
java.util.Map unregisteredExistingObjects,
java.util.Map visitedObjects,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Set cascadeErrors)
INTERNAL:
Cascade discover and persist new objects during commit.
|
void |
cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
INTERNAL:
Cascade perform delete through mappings that require the cascade
|
void |
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
INTERNAL:
Cascade perform removal of orphaned private owned objects from the UnitOfWorkChangeSet
|
void |
cascadeRegisterNewIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
java.lang.Object |
clone()
INTERNAL:
The mapping clones itself to create deep copy.
|
void |
collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> 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
|
void |
compareCollectionsForChange(java.lang.Object oldCollection,
java.lang.Object newCollection,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is used to calculate the differences between two collections.
|
org.eclipse.persistence.internal.sessions.ChangeRecord |
compareForChange(java.lang.Object clone,
java.lang.Object backUp,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is used to create a change record from comparing two collections.
|
protected boolean |
compareLists(java.util.List firstList,
java.util.List secondList,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean withPrivateOwned)
Compare two lists.
|
protected void |
compareListsAndWrite(java.util.List previousList,
java.util.List currentList,
WriteObjectQuery query)
INTERNAL:
Old and new lists are compared and only the changes are written to the database.
|
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 void |
compareObjectsAndWrite(WriteObjectQuery query)
INTERNAL:
The memory objects are compared and only the changes are written to the database.
|
protected boolean |
compareObjectsWithoutPrivateOwned(java.lang.Object firstCollection,
java.lang.Object secondCollection,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Compare two objects if their parts are not private owned
|
protected boolean |
compareObjectsWithPrivateOwned(java.lang.Object firstCollection,
java.lang.Object secondCollection,
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
This method is implemented by subclasses as necessary.
|
protected java.lang.Object |
copyElement(java.lang.Object original,
CopyGroup group)
INTERNAL:
Copies member's value
|
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 translationRow)
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.
|
protected java.lang.Object |
extractKeyFromTargetRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Extract the source primary key value from the target 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 |
fixRealObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
INTERNAL:
We are not using a remote valueholder
so we need to replace the reference object(s) with
the corresponding object(s) from the remote session.
|
protected Expression |
getAdditionalFieldsBaseExpression(ReadQuery query)
INTERNAL:
Return the base expression to use for adding fields to the query.
|
org.eclipse.persistence.internal.queries.ContainerPolicy |
getContainerPolicy()
INTERNAL:
Returns the receiver's containerPolicy.
|
protected ModifyQuery |
getDeleteAllQuery() |
Expression |
getJoinCriteria(org.eclipse.persistence.internal.expressions.ObjectExpression context,
Expression base)
INTERNAL:
Returns the join criteria stored in the mapping selection query.
|
org.eclipse.persistence.internal.helper.DatabaseField |
getListOrderField()
PUBLIC:
Field holds the order of elements in the list in the db, requires collection of type List;
may be not null only in case isListOrderFieldSupported==true.
|
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> |
getOrderByQueryKeyExpressions()
INTERNAL:
Return the ordering query keys.
|
OrderCorrectionType |
getOrderCorrectionType()
PUBLIC:
Specifies what should be done if the list of values read from listOrserField is invalid
(there should be no nulls, no duplicates, no "holes").
|
java.lang.Object |
getRealCollectionAttributeValueFromObject(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Convenience method.
|
protected org.eclipse.persistence.internal.queries.ContainerPolicy |
getSelectionQueryContainerPolicy()
INTERNAL:
Get the container policy from the selection query for this mapping.
|
java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> |
getTargetPrimaryKeyFields()
INTERNAL:
Returns list of primary key fields from the reference descriptor.
|
protected boolean |
hasCustomDeleteAllQuery() |
boolean |
hasOrderBy()
INTERNAL:
Return true if ascending or descending ordering has been set on this
mapping via the @OrderBy annotation.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the state of mapping.
|
protected void |
initializeChangeOrderTargetQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize changeOrderTargetQuery.
|
protected void |
initializeListOrderField(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initializes listOrderField.
|
protected void |
initializeListOrderFieldTable(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initializes listOrderField's table, does nothing by default.
|
boolean |
isAttributeValueInstantiatedOrChanged(java.lang.Object object)
INTERNAL:
The referenced object is checked if it is instantiated or not,
also check if it has been changed (as indirect collections avoid instantiation on add/remove.
|
boolean |
isChangeTrackingSupported(Project project)
INTERNAL:
Return if this mapping supports change tracking.
|
boolean |
isCollectionMapping()
INTERNAL:
Return whether this mapping is a Collection type.
|
boolean |
isListOrderFieldSupported()
PUBLIC:
indicates whether the mapping supports listOrderField, if it doesn't attempt to set listOrderField throws exception.
|
boolean |
isMapKeyObjectRelationship()
INTERNAL:
Return if this mapping has a mapped key that uses a OneToOne (object).
|
void |
iterateOnElement(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
java.lang.Object element)
INTERNAL:
Iterate on the specified element.
|
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 |
loadAll(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.helper.IdentityHashSet loaded)
Force instantiation of all indirections.
|
void |
mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord chgRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL:
Merge changes from the source to the target object.
|
void |
mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL:
Merge changes from the source to the target object.
|
boolean |
mustDeleteReferenceObjectsOneByOne()
ADVANCED:
Return whether the reference objects must be deleted
one by one, as opposed to with a single DELETE statement.
|
protected void |
objectAddedDuringUpdate(ObjectLevelModifyQuery query,
java.lang.Object objectAdded,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
java.util.Map extraData)
INTERNAL:
An object was added to the collection during an update, insert it if private.
|
protected void |
objectOrderChangedDuringUpdate(WriteObjectQuery query,
java.lang.Object orderChangedObject,
int orderIndex) |
protected void |
objectRemovedDuringUpdate(ObjectLevelModifyQuery query,
java.lang.Object objectDeleted,
java.util.Map extraData)
INTERNAL:
An object was removed to the collection during an update, delete it if private.
|
protected void |
objectUnchangedDuringUpdate(ObjectLevelModifyQuery query,
java.lang.Object object)
INTERNAL:
An object is still in the collection, update it as it may have changed.
|
protected void |
objectUnchangedDuringUpdate(ObjectLevelModifyQuery query,
java.lang.Object object,
java.util.Map backupclones,
java.lang.Object key)
INTERNAL:
An object is still in the collection, update it as it may have changed.
|
void |
postCalculateChanges(ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Overridden by mappings that require additional processing of the change record after the record has been calculated.
|
void |
postDelete(DeleteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behavior.
|
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Ensure the container policy is post initialized
|
void |
postInsert(WriteObjectQuery query)
INTERNAL:
A subclass should implement this method if it wants different behavior.
|
protected void |
postPrepareNestedBatchQuery(ReadQuery batchQuery,
ObjectLevelReadQuery query)
INTERNAL:
Add additional fields
|
void |
preInsert(WriteObjectQuery query)
INTERNAL:
Propagate preInsert event to container policy if necessary
|
protected void |
prepareTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
java.lang.Object object,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
copies the non primary key information into the row currently used only in ManyToMany
|
void |
preUpdate(WriteObjectQuery query)
INTERNAL:
Propagate preUpdate event to container policy if necessary
|
protected java.lang.Object |
readPrivateOwnedForObject(ObjectLevelModifyQuery modifyQuery)
INTERNAL:
All the privately owned parts are read
|
void |
recordPrivateOwnedRemovals(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Overridden by mappings that require additional processing of the change record after the record has been calculated.
|
java.util.Map |
replaceValueHoldersIn(java.lang.Object object,
org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
INTERNAL:
replace the value holders in the specified reference object(s)
|
void |
setChangeListener(java.lang.Object clone,
java.beans.PropertyChangeListener listener,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Set the change listener in the collection.
|
void |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
ADVANCED:
Configure the mapping to use a container policy.
|
void |
setCustomDeleteAllQuery(ModifyQuery query)
PUBLIC:
The default delete all query for mapping can be overridden by specifying the new query.
|
void |
setDeleteAllCall(Call call)
PUBLIC:
Set the receiver's delete all call.
|
protected void |
setDeleteAllQuery(ModifyQuery query) |
void |
setDeleteAllSQLString(java.lang.String sqlString)
PUBLIC:
Set the receiver's delete all SQL string.
|
protected void |
setHasCustomDeleteAllQuery(boolean bool) |
void |
setListOrderField(org.eclipse.persistence.internal.helper.DatabaseField field)
PUBLIC:
Field holds the order of elements in the list in the db, requires collection of type List.
|
void |
setListOrderFieldName(java.lang.String fieldName)
PUBLIC:
Field holds the order of elements in the list in the db, requires collection of type List.
|
void |
setMustDeleteReferenceObjectsOneByOne(java.lang.Boolean deleteOneByOne)
ADVANCED::
Return whether the reference objects must be deleted
one by one, as opposed to with a single DELETE statement.
|
void |
setOrderCorrectionType(OrderCorrectionType orderCorrectionType)
PUBLIC:
Specifies what should be done if the list of values read from listOrserField is invalid
(there should be no nulls, no duplicates, no "holes").
|
protected void |
setSelectionQueryContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
INTERNAL:
Set the container policy on the selection query for this mapping.
|
void |
setSessionName(java.lang.String name)
PUBLIC:
Set the name of the session to execute the mapping's queries under.
|
void |
setUseLazyInstantiationForIndirectCollection(java.lang.Boolean useLazyInstantiation)
ADVANCED:
Calling this method will only affect behavior of mappings using transparent indirection
This method should only be called after this mapping's indirection policy has been set
IndirectList and IndirectSet can be configured not to instantiate the list from the
database when you add and remove from them.
|
java.lang.Boolean |
shouldUseLazyInstantiationForIndirectCollection()
ADVANCED:
This method should only be called after this mapping's indirection policy has been set
IndirectList and IndirectSet can be configured not to instantiate the list from the
database when you add and remove from them.
|
boolean |
shouldUseListOrderFieldTableExpression()
INTERNAL:
Indicates whether getListOrderFieldExpression method should create field expression based on table expression.
|
void |
simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object changeSetToAdd,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
ADVANCED:
This method is used to have an object add to a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object changeSetToRemove,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
ADVANCED:
This method is used to have an object removed from a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
updateChangeRecord(java.lang.Object clone,
java.lang.Object newValue,
java.lang.Object oldValue,
org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Either create a new change record or update with the new value.
|
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 |
updateCollectionChangeRecord(CollectionChangeEvent event,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Add or removes a new value and its change set to the collection change record based on the event passed in.
|
void |
useCollectionClass(java.lang.Class concreteClass)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useCollectionClassName(java.lang.String concreteClassName)
INTERNAL:
Used to set the collection class by name.
|
void |
useListClassName(java.lang.String concreteClassName)
INTERNAL:
Used to set the collection class by name.
|
void |
useMapClass(java.lang.Class concreteClass)
PUBLIC:
Configure the mapping to use an instance of the specified container
class to hold the target objects.
|
void |
useMapClass(java.lang.Class concreteClass,
java.lang.String keyName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useMapClassName(java.lang.String concreteClassName,
java.lang.String methodName)
INTERNAL:
Not sure were this is used, MW?
|
void |
useSortedSetClass(java.lang.Class concreteClass,
java.util.Comparator comparator)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useSortedSetClassName(java.lang.String className)
INTERNAL:
Configure the mapping to use an instance of the specified container class name
to hold the target objects.
|
void |
useSortedSetClassName(java.lang.String className,
java.lang.String comparatorClassName)
INTERNAL:
Configure the mapping to use an instance of the specified container class name
to hold the target objects.
|
void |
useTransparentCollection()
PUBLIC:
If transparent indirection is used, a special collection will be placed in the source
object's attribute.
|
void |
useTransparentList()
PUBLIC:
If transparent indirection is used, a special collection will be placed in the source
object's attribute.
|
void |
useTransparentMap(java.lang.String methodName)
PUBLIC:
If transparent indirection is used, a special map will be placed in the source
object's attribute.
|
void |
useTransparentSet()
PUBLIC:
If transparent indirection is used, a special collection will be placed in the source
object's attribute.
|
void |
validateBeforeInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
To validate mappings declaration
|
java.lang.Object |
valueFromPKList(java.lang.Object[] pks,
org.eclipse.persistence.internal.sessions.AbstractRecord foreignKeys,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is used to load a relationship from a list of PKs.
|
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:
Return the value of the field from the row or a value holder on the query to obtain the object.
|
boolean |
verifyDelete(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Checks if object is deleted from the database or not.
|
void |
writeChanges(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
WriteObjectQuery query)
INTERNAL:
Write the changes defined in the change set for the mapping.
|
addForeignKeyField, addTargetForeignKeyField, batchedValueFromRow, buildBackupClone, buildBatchCriteria, buildClone, buildCloneFromRow, checkCacheForBatchKey, createCloneValueHolder, dontDoMerge, dontUseBatchReading, dontUseIndirection, extendPessimisticLockScopeInSourceQuery, extendPessimisticLockScopeInTargetQuery, extractBatchKeyFromRow, fixObjectReferences, getAttributeValueFromObject, getAttributeValueWithClonedValueHolders, getBatchFetchType, getExtendPessimisticLockScopeDedicatedQuery, getFieldsForTranslationInAggregate, getIndirectionPolicy, getJoinFetch, getMappedBy, getOrderByNormalizedExpressions, getPartitioningPolicy, getPartitioningPolicyName, getRealAttributeValueFromAttribute, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getRelationshipPartner, getRelationshipPartnerAttributeName, getSelectionCriteria, getSelectionQuery, getTempSession, getValueFromRemoteValueHolder, hasCustomSelectionQuery, hasDependency, hasNestedIdentityReference, initializeReferenceDescriptor, initializeSelectionQuery, instantiateAttribute, isAttributeValueFromObjectInstantiated, isAttributeValueFullyBuilt, isAttributeValueInstantiated, isCascadeDetach, isCascadeMerge, isCascadeOnDeleteSetOnDatabase, isCascadePersist, isCascadeRefresh, isCascadeRemove, isExtendingPessimisticLockScope, isForeignReferenceMapping, isInnerJoinFetched, isJoinFetched, isJoiningSupported, isLazy, isLockableMapping, isOuterJoinFetched, isPrivateOwned, iterate, mergeRemoteValueHolder, preInitialize, prepareHistoricalQuery, prepareNestedBatchQuery, prepareNestedJoinQueryClone, prepareNestedJoins, privateOwnedRelationship, readFromRowIntoObject, remoteInitialization, requiresTransientWeavedFields, setBatchFetchType, setCascadeAll, setCascadeDetach, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setForceInitializationOfSelectionCriteria, setHasCustomSelectionQuery, setIndirectionPolicy, setIsCacheable, setIsCascadeOnDeleteSetOnDatabase, setIsPrivateOwned, setJoinFetch, setMappedBy, setPartitioningPolicy, setPartitioningPolicyName, setRealAttributeValueInObject, setReferenceClass, setReferenceClassName, setReferenceDescriptor, setRelationshipPartner, setRelationshipPartnerAttributeName, setRequiresTransientWeavedFields, setSelectionCall, setSelectionCriteria, setSelectionQuery, setSelectionSQLString, setShouldExtendPessimisticLockScope, setTempSession, setUsesBatchReading, setUsesIndirection, shouldExtendPessimisticLockScope, shouldExtendPessimisticLockScopeInDedicatedQuery, shouldExtendPessimisticLockScopeInSourceQuery, shouldExtendPessimisticLockScopeInTargetQuery, shouldForceInitializationOfSelectionCriteria, shouldInitializeSelectionCriteria, shouldMergeCascadeParts, shouldMergeCascadeReference, shouldObjectModifyCascadeToParts, shouldRefreshCascadeParts, shouldUseBatchReading, shouldUseValueFromRowWithJoin, trimRowForJoin, trimRowForJoin, useBasicIndirection, useBatchReading, useContainerIndirection, useInnerJoinFetch, useOuterJoinFetch, usesIndirection, useWeavedIndirection, valueFromRow, valueFromRowInternal, valueFromRowInternaladdUnconvertedProperty, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, cloneFields, collectFields, convertConverterClassNamesToClasses, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, getAttributeAccessor, getAttributeClassification, getAttributeName, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getProperties, getProperty, getRealAttributeValueFromObject, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getWeight, hasConstraintDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isCloningRequired, 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, performDataModificationEvent, postCalculateChangesOnDeleted, postInitializeSourceAndTargetExpressions, postUpdate, preDelete, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readOnly, readWrite, rehashFieldDependancies, remotelyInitialized, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setSetMethodName, setWeight, toString, validateAfterInitialization, valueFromObject, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRowprotected transient ModifyQuery deleteAllQuery
protected transient boolean hasCustomDeleteAllQuery
protected org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy
protected boolean hasOrderBy
protected org.eclipse.persistence.internal.helper.DatabaseField listOrderField
protected boolean isListOrderFieldSupported
protected transient DataModifyQuery changeOrderTargetQuery
protected OrderCorrectionType orderCorrectionType
protected java.lang.Boolean mustDeleteReferenceObjectsOneByOne
protected static boolean isSynchronizeOnMerge
public void addAscendingOrdering(java.lang.String queryKeyName)
public void addDescendingOrdering(java.lang.String queryKeyName)
public void addOrderBy(java.lang.String queryKeyName,
boolean isDescending)
public void addAggregateOrderBy(java.lang.String aggregateName,
java.lang.String queryKeyName,
boolean isDescending)
public 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 ForeignReferenceMappingpublic 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 ForeignReferenceMappingpublic java.lang.Object buildContainerClone(java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
buildContainerClone in class DatabaseMappingpublic void buildCopy(java.lang.Object copy,
java.lang.Object original,
CopyGroup group)
buildCopy in class DatabaseMappingprotected java.lang.Object copyElement(java.lang.Object original,
CopyGroup group)
public java.lang.Object buildElementUnitOfWorkClone(java.lang.Object element,
java.lang.Object parent,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
boolean isExisting,
boolean isFromSharedCache)
public java.lang.Object buildElementClone(java.lang.Object element,
java.lang.Object parent,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession,
boolean isExisting,
boolean isFromSharedCache)
public Expression buildExpression(java.lang.Object queryObject, QueryByExamplePolicy policy, Expression expressionBuilder, java.util.Map processedObjects, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildExpression in class DatabaseMappingpublic java.lang.Object[] buildReferencesPKList(java.lang.Object entity,
java.lang.Object attribute,
org.eclipse.persistence.internal.sessions.AbstractSession session)
buildReferencesPKList in class ForeignReferenceMappingpublic void cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadePerformRemoveIfRequired in class DatabaseMappingpublic void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired in class DatabaseMappingpublic void cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object,
java.util.Map newObjects,
java.util.Map unregisteredExistingObjects,
java.util.Map visitedObjects,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Set cascadeErrors)
cascadeDiscoverAndPersistUnregisteredNewObjects in class DatabaseMappingpublic void cascadeRegisterNewIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
cascadeRegisterNewIfRequired in class DatabaseMappingpublic void collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> record)
collectQueryParameters in class ForeignReferenceMappingpublic void calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
calculateDeferredChanges in class DatabaseMappingpublic java.lang.Object clone()
clone in class ForeignReferenceMappingpublic void compareCollectionsForChange(java.lang.Object oldCollection,
java.lang.Object newCollection,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone,
java.lang.Object backUp,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
compareForChange in class DatabaseMappingpublic boolean compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects in class ForeignReferenceMappingpublic void writeChanges(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
protected void compareObjectsAndWrite(WriteObjectQuery query) throws DatabaseException, OptimisticLockException
protected void compareListsAndWrite(java.util.List previousList,
java.util.List currentList,
WriteObjectQuery query)
throws DatabaseException,
OptimisticLockException
protected boolean compareObjectsWithoutPrivateOwned(java.lang.Object firstCollection,
java.lang.Object secondCollection,
org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjectsWithoutPrivateOwned in class ForeignReferenceMappingprotected boolean compareObjectsWithPrivateOwned(java.lang.Object firstCollection,
java.lang.Object secondCollection,
org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjectsWithPrivateOwned in class ForeignReferenceMappingprotected boolean compareLists(java.util.List firstList,
java.util.List secondList,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean withPrivateOwned)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses in class ForeignReferenceMappingclassLoader - 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
extractResultFromBatchQuery in class ForeignReferenceMappingQueryExceptionprotected 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 translationRow)
executeBatchQuery in class ForeignReferenceMappingprotected java.lang.Object extractKeyFromTargetRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
public void fixRealObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
fixRealObjectReferences in class DatabaseMappingpublic org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
getContainerPolicy in interface ContainerMappinggetContainerPolicy in class DatabaseMappingprotected ModifyQuery getDeleteAllQuery()
public Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.ObjectExpression context, Expression base)
getJoinCriteria in class ForeignReferenceMappingpublic java.lang.Object getObjectCorrespondingTo(java.lang.Object object,
DistributedSession session,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query)
getObjectCorrespondingTo in class ForeignReferenceMappingpublic java.util.List<Expression> getOrderByQueryKeyExpressions()
protected org.eclipse.persistence.internal.queries.ContainerPolicy getSelectionQueryContainerPolicy()
public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
getRealCollectionAttributeValueFromObject in class DatabaseMappingDescriptorExceptionpublic org.eclipse.persistence.internal.helper.DatabaseField getListOrderField()
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getTargetPrimaryKeyFields()
public OrderCorrectionType getOrderCorrectionType()
protected boolean hasCustomDeleteAllQuery()
public boolean hasOrderBy()
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class ForeignReferenceMappingDescriptorExceptionprotected void initializeListOrderField(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeListOrderFieldTable(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void buildListOrderField()
public java.lang.Boolean shouldUseLazyInstantiationForIndirectCollection()
public boolean shouldUseListOrderFieldTableExpression()
protected void initializeChangeOrderTargetQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean isCollectionMapping()
isCollectionMapping in class DatabaseMappingpublic boolean isMapKeyObjectRelationship()
public boolean isAttributeValueInstantiatedOrChanged(java.lang.Object object)
public void iterateOnElement(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
java.lang.Object element)
public void iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
java.lang.Object realAttributeValue)
iterateOnRealAttributeValue in class ForeignReferenceMappingpublic 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 ForeignReferenceMappingpublic void loadAll(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.helper.IdentityHashSet loaded)
loadAll in class DatabaseMappingpublic boolean mustDeleteReferenceObjectsOneByOne()
public void mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord chgRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeChangesIntoObject in class DatabaseMappingpublic void mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeIntoObject in class DatabaseMappingprotected void objectAddedDuringUpdate(ObjectLevelModifyQuery query, java.lang.Object objectAdded, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, java.util.Map extraData) throws DatabaseException, OptimisticLockException
protected void objectOrderChangedDuringUpdate(WriteObjectQuery query, java.lang.Object orderChangedObject, int orderIndex)
protected void objectRemovedDuringUpdate(ObjectLevelModifyQuery query, java.lang.Object objectDeleted, java.util.Map extraData) throws DatabaseException, OptimisticLockException
protected void objectUnchangedDuringUpdate(ObjectLevelModifyQuery query, java.lang.Object object) throws DatabaseException, OptimisticLockException
public void postCalculateChanges(ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
postCalculateChanges in class DatabaseMappingpublic void recordPrivateOwnedRemovals(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
recordPrivateOwnedRemovals in class DatabaseMappingprotected void postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)
postPrepareNestedBatchQuery in class ForeignReferenceMappingprotected Expression getAdditionalFieldsBaseExpression(ReadQuery query)
protected void prepareTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
java.lang.Object object,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
public void postDelete(DeleteObjectQuery query) throws DatabaseException
postDelete in class DatabaseMappingDatabaseExceptionpublic void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
postInitialize in class DatabaseMappingpublic void postInsert(WriteObjectQuery query) throws DatabaseException
postInsert in class DatabaseMappingDatabaseExceptionpublic void preInsert(WriteObjectQuery query) throws DatabaseException, OptimisticLockException
preInsert in class DatabaseMappingDatabaseExceptionOptimisticLockExceptionpublic void preUpdate(WriteObjectQuery query) throws DatabaseException
preUpdate in class DatabaseMappingDatabaseExceptionprotected void objectUnchangedDuringUpdate(ObjectLevelModifyQuery query, java.lang.Object object, java.util.Map backupclones, java.lang.Object key) throws DatabaseException, OptimisticLockException
protected java.lang.Object readPrivateOwnedForObject(ObjectLevelModifyQuery modifyQuery) throws DatabaseException
DatabaseExceptionpublic java.util.Map replaceValueHoldersIn(java.lang.Object object,
org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
replaceValueHoldersIn in class ForeignReferenceMappingpublic void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
setContainerPolicy in interface ContainerMappingpublic void setCustomDeleteAllQuery(ModifyQuery query)
protected void setDeleteAllQuery(ModifyQuery query)
public void setDeleteAllSQLString(java.lang.String sqlString)
public void setDeleteAllCall(Call call)
protected void setHasCustomDeleteAllQuery(boolean bool)
protected void setSelectionQueryContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
public void setSessionName(java.lang.String name)
public void setUseLazyInstantiationForIndirectCollection(java.lang.Boolean useLazyInstantiation)
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object changeSetToAdd,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleAddToCollectionChangeRecord in class DatabaseMappingpublic void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object changeSetToRemove,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleRemoveFromCollectionChangeRecord in class DatabaseMappingpublic void updateChangeRecord(java.lang.Object clone,
java.lang.Object newValue,
java.lang.Object oldValue,
org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
updateChangeRecord in class DatabaseMappingpublic 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)
updateChangeRecordForSelfMerge in class ForeignReferenceMappingpublic void updateCollectionChangeRecord(CollectionChangeEvent event, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
updateCollectionChangeRecord in class DatabaseMappingpublic void setChangeListener(java.lang.Object clone,
java.beans.PropertyChangeListener listener,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
setChangeListener in class DatabaseMappingpublic boolean isListOrderFieldSupported()
public void setListOrderField(org.eclipse.persistence.internal.helper.DatabaseField field)
public void setListOrderFieldName(java.lang.String fieldName)
public void setMustDeleteReferenceObjectsOneByOne(java.lang.Boolean deleteOneByOne)
public void setOrderCorrectionType(OrderCorrectionType orderCorrectionType)
public void useCollectionClass(java.lang.Class concreteClass)
The container class must implement (directly or indirectly) the
java.util.Collection interface.
useCollectionClass in interface ContainerMappingpublic void useSortedSetClass(java.lang.Class concreteClass,
java.util.Comparator comparator)
The container class must implement (directly or indirectly) the
java.util.SortedSet interface.
public void useSortedSetClassName(java.lang.String className)
The container class must implement (directly or indirectly) the
java.util.SortedSet interface.
public void useSortedSetClassName(java.lang.String className,
java.lang.String comparatorClassName)
The container class must implement (directly or indirectly) the
java.util.SortedSet interface.
public void useCollectionClassName(java.lang.String concreteClassName)
useCollectionClassName in interface ContainerMappingpublic void useListClassName(java.lang.String concreteClassName)
useListClassName in interface ContainerMappingpublic void useMapClass(java.lang.Class concreteClass,
java.lang.String keyName)
Map is the value returned by a call to the specified
zero-argument method.
The method must be implemented by the class (or a superclass) of any
value to be inserted into the Map.
The container class must implement (directly or indirectly) the
java.util.Map interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClass in interface ContainerMappingpublic void useMapClass(java.lang.Class concreteClass)
Map is an instance of the composite primary key class.
To facilitate resolving the primary key class, the mapping's referenceClass must set before calling this method.
The container class must implement (directly or indirectly) the
java.util.Map interface.
public void useMapClassName(java.lang.String concreteClassName,
java.lang.String methodName)
useMapClassName in interface ContainerMappingpublic void useTransparentCollection()
public void useTransparentSet()
public void useTransparentList()
public void useTransparentMap(java.lang.String methodName)
The key used in the Map is the value returned by a call to the zero parameter method named methodName. The method should be a zero argument method implemented (or inherited) by the value to be inserted into the Map.
public void validateBeforeInitialization(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
validateBeforeInitialization in class ForeignReferenceMappingDescriptorExceptionpublic boolean verifyDelete(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DatabaseException
verifyDelete in class DatabaseMappingDatabaseExceptionpublic boolean isChangeTrackingSupported(Project project)
isChangeTrackingSupported in class DatabaseMappingpublic org.eclipse.persistence.internal.sessions.ChangeRecord buildChangeRecord(java.lang.Object clone,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
buildChangeRecord in class DatabaseMappingpublic java.lang.Object valueFromPKList(java.lang.Object[] pks,
org.eclipse.persistence.internal.sessions.AbstractRecord foreignKeys,
org.eclipse.persistence.internal.sessions.AbstractSession session)
valueFromPKList in class ForeignReferenceMappingprotected 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
valueFromRowInternalWithJoin in class ForeignReferenceMappingDatabaseException