public abstract class CollectionMapping extends ForeignReferenceMapping implements ContainerMapping
Purpose: Abstract class for relationship mappings which store collection of objects
DatabaseMapping.WriteTypeINNER_JOIN, NONE, OUTER_JOIN, QUERY_BATCH_PARAMETER| Constructor and Description |
|---|
CollectionMapping()
PUBLIC:
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAggregateOrderBy(String aggregateName,
String queryKeyName,
boolean isDescending)
PUBLIC:
Provide order support for queryKeyName in ascending or descending order.
|
void |
addAscendingOrdering(String queryKeyName)
PUBLIC:
Provide order support for queryKeyName in ascending order
|
void |
addDescendingOrdering(String queryKeyName)
PUBLIC:
Provide order support for queryKeyName in descending order.
|
void |
addOrderBy(String queryKeyName,
boolean isDescending)
PUBLIC:
Provide order support for queryKeyName in descending or ascending order.
|
Object |
buildBackupCloneForPartObject(Object attributeValue,
Object clone,
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(Object clone,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Directly build a change record without comparison
|
Object |
buildCloneForPartObject(Object attributeValue,
Object original,
Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
boolean isExisting)
INTERNAL:
Require for cloning, the part must be cloned.
|
void |
buildCopy(Object copy,
Object original,
CopyGroup group)
INTERNAL:
Copy of the attribute of the object.
|
Object |
buildElementClone(Object element,
Object parent,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
boolean isExisting)
INTERNAL:
Clone the element, if necessary.
|
Object[] |
buildReferencesPKList(Object entity,
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(Object object,
Map newObjects,
Map unregisteredExistingObjects,
Map visitedObjects,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Cascade discover and persist new objects during commit.
|
void |
cascadeMerge(Object sourceElement,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Cascade the merge to the component object, if appropriate.
|
void |
cascadePerformRemoveIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade perform delete through mappings that require the cascade
|
void |
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade perform removal of orphaned private owned objects from the UnitOfWorkChangeSet
|
void |
cascadeRegisterNewIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
Object |
clone()
INTERNAL:
The mapping clones itself to create deep copy.
|
void |
compareCollectionsForChange(Object oldCollection,
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(Object clone,
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.
|
boolean |
compareObjects(Object firstObject,
Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
void |
convertClassNamesToClasses(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.
|
Object |
extractResultFromBatchQuery(ReadQuery batchQuery,
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(Object object,
Map objectDescriptors,
Map processedObjects,
ObjectLevelReadQuery query,
RemoteSession 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.
|
org.eclipse.persistence.internal.queries.ContainerPolicy |
getContainerPolicy()
INTERNAL:
Returns the receiver's containerPolicy.
|
Expression |
getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
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.
|
Object |
getObjectCorrespondingTo(Object object,
RemoteSession session,
Map objectDescriptors,
Map processedObjects,
ObjectLevelReadQuery query)
INTERNAL:
return the object on the client corresponding to the specified object.
|
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").
|
Object |
getRealCollectionAttributeValueFromObject(Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Convenience method.
|
List<org.eclipse.persistence.internal.helper.DatabaseField> |
getTargetPrimaryKeyFields()
INTERNAL:
Returns list of primary key fields from the reference descriptor.
|
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.
|
boolean |
isAttributeValueInstantiatedOrChanged(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,
Object element)
INTERNAL:
Iterate on the specified element.
|
void |
iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
Object realAttributeValue)
INTERNAL:
Iterate on the attribute value.
|
void |
mergeChangesIntoObject(Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord chgRecord,
Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
void |
mergeIntoObject(Object target,
boolean isTargetUnInitialized,
Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
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.
|
void |
preInsert(WriteObjectQuery query)
INTERNAL:
Propagate preInsert event to container policy if necessary
|
void |
preUpdate(WriteObjectQuery query)
INTERNAL:
Propagate preUpdate event to container policy if necessary
|
void |
recordPrivateOwnedRemovals(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.
|
Map |
replaceValueHoldersIn(Object object,
org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
INTERNAL:
replace the value holders in the specified reference object(s)
|
void |
setChangeListener(Object clone,
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.
|
void |
setDeleteAllSQLString(String sqlString)
PUBLIC:
Set the receiver's delete all SQL string.
|
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(String fieldName)
PUBLIC:
Field holds the order of elements in the list in the db, requires collection of type List.
|
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").
|
void |
setSessionName(String name)
PUBLIC:
Set the name of the session to execute the mapping's queries under.
|
boolean |
shouldUseListOrderFieldTableExpression()
INTERNAL:
Indicates whether getListOrderFieldExpression method should create field expression based on table expression.
|
void |
simpleAddToCollectionChangeRecord(Object referenceKey,
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(Object referenceKey,
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(Object clone,
Object newValue,
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 |
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(Class concreteClass)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useCollectionClassName(String concreteClassName)
INTERNAL:
Not sure were this is used, MW?
|
void |
useListClassName(String concreteClassName)
INTERNAL:
Not sure were this is used, MW?
|
void |
useMapClass(Class concreteClass)
PUBLIC:
Configure the mapping to use an instance of the specified container
class to hold the target objects.
|
void |
useMapClass(Class concreteClass,
String keyName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useMapClassName(String concreteClassName,
String methodName)
INTERNAL:
Not sure were this is used, MW?
|
void |
useSortedSetClass(Class concreteClass,
Comparator comparator)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useSortedSetClassName(String className)
INTERNAL:
Configure the mapping to use an instance of the specified container class name
to hold the target objects.
|
void |
useSortedSetClassName(String className,
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(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
|
Object |
valueFromPKList(Object[] pks,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is used to load a relationship from a list of PKs.
|
boolean |
verifyDelete(Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Checks if object is deleted from the database or not.
|
buildBackupClone, buildClone, buildCloneFromRow, createUnitOfWorkValueHolder, dontUseBatchReading, dontUseIndirection, extendPessimisticLockScopeInSourceQuery, fixObjectReferences, getAttributeValueFromObject, getAttributeValueWithClonedValueHolders, getBatchFetchType, getIndirectionPolicy, getJoinFetch, getRealAttributeValueFromAttribute, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getRelationshipPartner, getRelationshipPartnerAttributeName, getSelectionCriteria, getSelectionQuery, getValueFromRemoteValueHolder, hasCustomSelectionQuery, instantiateAttribute, isAttributeValueInstantiated, isCascadeDetach, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isForeignReferenceMapping, isInnerJoinFetched, isJoinFetched, isJoiningSupported, isLazy, isLockableMapping, isOuterJoinFetched, isPrivateOwned, iterate, mergeRemoteValueHolder, preInitialize, prepareNestedBatchQuery, prepareNestedJoins, privateOwnedRelationship, remoteInitialization, requiresTransientWeavedFields, setBatchFetchType, setCascadeAll, setCascadeDetach, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setForceInitializationOfSelectionCriteria, setIndirectionPolicy, setIsPrivateOwned, setJoinFetch, setRealAttributeValueInObject, setReferenceClass, setReferenceClassName, setRelationshipPartner, setRelationshipPartnerAttributeName, setRequiresTransientWeavedFields, setSelectionCall, setSelectionCriteria, setSelectionSQLString, setShouldExtendPessimisticLockScope, setUsesBatchReading, setUsesIndirection, shouldExtendPessimisticLockScope, shouldExtendPessimisticLockScopeInDedicatedQuery, shouldExtendPessimisticLockScopeInSourceQuery, shouldExtendPessimisticLockScopeInTargetQuery, shouldMergeCascadeParts, shouldUseBatchReading, trimRowForJoin, trimRowForJoin, useBasicIndirection, useBatchReading, useContainerIndirection, useInnerJoinFetch, useOuterJoinFetch, usesIndirection, useWeavedIndirection, valueFromRowbuildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, derivesId, earlyPreDelete, getAttributeAccessor, getAttributeClassification, getAttributeName, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getProperties, getProperty, getRealAttributeValueFromObject, getSelectFields, getSelectTables, getSetMethodName, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isCloningRequired, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isJPAId, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOwned, isPrimaryKeyMapping, isReadOnly, isReferenceMapping, isRelationalMapping, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, performDataModificationEvent, postCalculateChangesOnDeleted, postUpdate, preDelete, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, rehashFieldDependancies, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setDerivedIdMapping, setDerivesId, setDescriptor, setGetMethodName, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setSetMethodName, setWeight, toString, validateAfterInitialization, valueFromObject, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRowpublic void addAscendingOrdering(String queryKeyName)
public void addDescendingOrdering(String queryKeyName)
public void addOrderBy(String queryKeyName, boolean isDescending)
public void addAggregateOrderBy(String aggregateName, String queryKeyName, boolean isDescending)
public Object buildBackupCloneForPartObject(Object attributeValue, Object clone, Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupCloneForPartObject in class ForeignReferenceMappingpublic Object buildCloneForPartObject(Object attributeValue, Object original, Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, boolean isExisting)
buildCloneForPartObject in class ForeignReferenceMappingpublic void buildCopy(Object copy, Object original, CopyGroup group)
buildCopy in class DatabaseMappingpublic Object buildElementClone(Object element, Object parent, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, boolean isExisting)
public Object[] buildReferencesPKList(Object entity, Object attribute, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildReferencesPKList in class ForeignReferenceMappingpublic void cascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadePerformRemoveIfRequired in class DatabaseMappingpublic void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired in class DatabaseMappingpublic void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
cascadeDiscoverAndPersistUnregisteredNewObjects in class DatabaseMappingpublic void cascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadeRegisterNewIfRequired in class DatabaseMappingpublic void calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
calculateDeferredChanges in class DatabaseMappingpublic void cascadeMerge(Object sourceElement, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
cascadeMerge in class DatabaseMappingpublic Object clone()
clone in class ForeignReferenceMappingpublic void compareCollectionsForChange(Object oldCollection, Object newCollection, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractSession session)
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(Object clone, Object backUp, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareForChange in class DatabaseMappingpublic boolean compareObjects(Object firstObject, Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects in class ForeignReferenceMappingpublic void convertClassNamesToClasses(ClassLoader classLoader)
convertClassNamesToClasses in class ForeignReferenceMappingclassLoader - public Object extractResultFromBatchQuery(ReadQuery batchQuery, org.eclipse.persistence.internal.sessions.AbstractRecord sourceRow, org.eclipse.persistence.internal.sessions.AbstractSession session, ObjectLevelReadQuery originalQuery) throws QueryException
extractResultFromBatchQuery in class ForeignReferenceMappingQueryExceptionpublic void fixRealObjectReferences(Object object, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query, RemoteSession session)
fixRealObjectReferences in class DatabaseMappingpublic org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
getContainerPolicy in interface ContainerMappinggetContainerPolicy in class DatabaseMappingpublic Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.QueryKeyExpression exp)
getJoinCriteria in class ForeignReferenceMappingpublic Object getObjectCorrespondingTo(Object object, RemoteSession session, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query)
getObjectCorrespondingTo in class ForeignReferenceMappingpublic List<Expression> getOrderByQueryKeyExpressions()
public Object getRealCollectionAttributeValueFromObject(Object object, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
getRealCollectionAttributeValueFromObject in class DatabaseMappingDescriptorExceptionpublic org.eclipse.persistence.internal.helper.DatabaseField getListOrderField()
public List<org.eclipse.persistence.internal.helper.DatabaseField> getTargetPrimaryKeyFields()
public OrderCorrectionType getOrderCorrectionType()
public boolean hasOrderBy()
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class ForeignReferenceMappingDescriptorExceptionpublic boolean shouldUseListOrderFieldTableExpression()
public boolean isCollectionMapping()
isCollectionMapping in class DatabaseMappingpublic boolean isMapKeyObjectRelationship()
public boolean isAttributeValueInstantiatedOrChanged(Object object)
public void iterateOnElement(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
Object element)
public void iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
Object realAttributeValue)
iterateOnRealAttributeValue in class ForeignReferenceMappingpublic void mergeChangesIntoObject(Object target, org.eclipse.persistence.internal.sessions.ChangeRecord chgRecord, Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
mergeChangesIntoObject in class DatabaseMappingpublic void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
mergeIntoObject in class DatabaseMappingpublic void postCalculateChanges(ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
postCalculateChanges in class DatabaseMappingpublic void recordPrivateOwnedRemovals(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
recordPrivateOwnedRemovals in class DatabaseMappingpublic 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 DatabaseMappingDatabaseExceptionpublic Map replaceValueHoldersIn(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)
public void setDeleteAllSQLString(String sqlString)
public void setDeleteAllCall(Call call)
public void setSessionName(String name)
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleAddToCollectionChangeRecord in class DatabaseMappingpublic void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleRemoveFromCollectionChangeRecord in class DatabaseMappingpublic void updateChangeRecord(Object clone, Object newValue, Object oldValue, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
updateChangeRecord in class DatabaseMappingpublic void updateCollectionChangeRecord(CollectionChangeEvent event, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
updateCollectionChangeRecord in class DatabaseMappingpublic void setChangeListener(Object clone, 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(String fieldName)
public void setOrderCorrectionType(OrderCorrectionType orderCorrectionType)
public void useCollectionClass(Class concreteClass)
The container class must implement (directly or indirectly) the
java.util.Collection interface.
useCollectionClass in interface ContainerMappingpublic void useSortedSetClass(Class concreteClass, Comparator comparator)
The container class must implement (directly or indirectly) the
java.util.SortedSet interface.
public void useSortedSetClassName(String className)
The container class must implement (directly or indirectly) the
java.util.SortedSet interface.
public void useSortedSetClassName(String className, String comparatorClassName)
The container class must implement (directly or indirectly) the
java.util.SortedSet interface.
public void useCollectionClassName(String concreteClassName)
public void useListClassName(String concreteClassName)
public void useMapClass(Class concreteClass, 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(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(String concreteClassName, String methodName)
public void useTransparentCollection()
public void useTransparentSet()
public void useTransparentList()
public void useTransparentMap(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(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(Object clone, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildChangeRecord in class DatabaseMappingpublic Object valueFromPKList(Object[] pks, org.eclipse.persistence.internal.sessions.AbstractSession session)
valueFromPKList in class ForeignReferenceMapping