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

public Class AggregateCollectionMapping

extends CollectionMapping
implements RelationalMapping, MapComponentMapping, EmbeddableMapping
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.mappings.EmbeddableMapping, org.eclipse.persistence.mappings.foundation.MapComponentMapping, org.eclipse.persistence.mappings.RelationalMapping
Imports
java.util.ArrayList, .Enumeration, .HashMap, .Iterator, .List, .Map, .Set, .TreeMap, .Vector, org.eclipse.persistence.descriptors.ClassDescriptor, .DescriptorEvent, .DescriptorEventManager, org.eclipse.persistence.descriptors.changetracking.AttributeChangeTrackingPolicy, .DeferredChangeDetectionPolicy, .ObjectChangeTrackingPolicy, org.eclipse.persistence.exceptions.ConversionException, .DatabaseException, .DescriptorException, .OptimisticLockException, .QueryException, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, .ExpressionMath, org.eclipse.persistence.indirection.IndirectList, .ValueHolder, org.eclipse.persistence.internal.descriptors.DescriptorIterator, .ObjectBuilder, org.eclipse.persistence.internal.expressions.SQLUpdateStatement, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, .DatabaseTable, .IdentityHashSet, .NonSynchronizedVector, org.eclipse.persistence.internal.identitymaps.CacheId, .CacheKey, org.eclipse.persistence.internal.mappings.converters.AttributeNameTokenizer.TokensIterator, org.eclipse.persistence.internal.queries.AttributeItem, .ContainerPolicy, .JoinedAttributeManager, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .AggregateCollectionChangeRecord, .ChangeRecord, .MergeManager, .ObjectChangeSet, .UnitOfWorkChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.mappings.converters.Converter, org.eclipse.persistence.mappings.foundation.MapComponentMapping, org.eclipse.persistence.queries.DataModifyQuery, .DatabaseQuery, .DeleteAllQuery, .DeleteObjectQuery, .InsertObjectQuery, .ModifyQuery, .ObjectBuildingQuery, .ObjectLevelModifyQuery, .ObjectLevelReadQuery, .QueryByExamplePolicy, .ReadAllQuery, .ReadQuery, .UpdateObjectQuery, .WriteObjectQuery, org.eclipse.persistence.sessions.CopyGroup, .DatabaseRecord, .Project, org.eclipse.persistence.sessions.remote.DistributedSession

Purpose: The aggregate collection mapping is used to represent the aggregate relationship between a single source object and a collection of target objects. The target objects cannot exist without the existence of the source object (privately owned) Unlike the normal aggregate mapping, there is a target table being mapped from the target objects. Unlike normal 1:m mapping, there is no 1:1 back reference mapping, as foreign key constraints have been resolved by the aggregation.

Author
King (Yaoping) Wang
Since
TOPLink/Java 3.0

Field Summary

Modifier and TypeField and Description
protected Map<String, DatabaseField>
aggregateToSourceFields

Map the name of a field in the aggregate collection descriptor to a field in the actual table specified in the mapping.

protected static final String
protected transient DataModifyQuery
protected Map<String, Converter>
converters

List of converters to apply at initialize time to their cloned aggregate mappings.

protected DatabaseTable
defaultSourceTable

Default source table that should be used with the default source fields of this mapping.

protected Boolean
hasNestedIdentityReference

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

protected boolean
isEntireObjectPK

Indicates whether the entire target object is primary key - in that case the object can't be updated in the db, but rather deleted and then re-inserted.

protected boolean
isListOrderFieldUpdatable

indicates whether listOrderField value could be updated in the db.

protected static final String
protected static final String
protected Map<String, Map<String, DatabaseField>>
nestedAggregateToSourceFields

Map the name of an attribute of the reference descriptor mapped with AggregateCollectionMapping to aggregateToSourceFieldNames that should be applied to this mapping.

protected static final String
protected transient DataModifyQuery
protected ClassDescriptor
remoteReferenceDescriptor

In RemoteSession case the mapping needs the reference descriptor serialized from the server, but referenceDescriptor attribute defined as transient in the superclass.

protected static final String
protected Vector<DatabaseField>
sourceKeyFields

This is a primary key in the source table that is used as foreign key in the target table

protected Vector<DatabaseField>
targetForeignKeyFields

This is a key in the target table which is a foreign key in the target table.

protected Map<DatabaseField, DatabaseField>
targetForeignKeyToSourceKeys

Foreign keys in the target table to the related keys in the source table

protected transient DataModifyQuery
updateListOrderFieldQuery

These queries used to update listOrderField

Inherited from org.eclipse.persistence.mappings.CollectionMapping:
changeOrderTargetQuerycontainerPolicydeleteAllQueryhasCustomDeleteAllQueryhasOrderByisListOrderFieldSupportedisSynchronizeOnMergelistOrderFieldmustDeleteReferenceObjectsOneByOneorderCorrectionType

Constructor Summary

AccessConstructor and Description
public
AggregateCollectionMapping()

PUBLIC: Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addConverter(Converter converter, String attributeName)

Implements org.eclipse.persistence.mappings.EmbeddableMapping.addConverter.

Add a converter to be applied to a mapping of the aggregate descriptor.
public void
addFieldNameTranslation(String sourceFieldName, String aggregateFieldName)

PUBLIC: Maps a field name in the aggregate descriptor to a field name in the source table.

public void
addFieldTranslation(DatabaseField sourceField, String aggregateField)

Implements org.eclipse.persistence.mappings.EmbeddableMapping.addFieldTranslation.

PUBLIC: Maps a field name in the aggregate descriptor to a field in the source table.
public void
addFieldTranslations(Map<String, DatabaseField> map)

PUBLIC: Maps a field name in the aggregate descriptor to a field name in the source table.

public void
addNestedFieldNameTranslation(String attributeName, String sourceFieldName, String aggregateFieldName)

PUBLIC: Map the name of an attribute of the reference descriptor mapped with AggregateCollectionMapping to aggregateToSourceFieldNames that should be applied to this mapping.

public void
addNestedFieldNameTranslations(String attributeName, Map<String, DatabaseField> map)

PUBLIC: Map the name of an attribute of the reference descriptor mapped with AggregateCollectionMapping to aggregateToSourceFields that should be applied to this mapping.

public void
addNestedFieldTranslation(String attributeName, DatabaseField sourceField, String aggregateFieldName)

Implements org.eclipse.persistence.mappings.EmbeddableMapping.addNestedFieldTranslation.

PUBLIC: Map the name of an attribute of the reference descriptor mapped with AggregateCollectionMapping to aggregateToSourceFieldNames that should be applied to this mapping.
public void
addOverrideManyToManyMapping(ManyToManyMapping mapping)

Implements org.eclipse.persistence.mappings.EmbeddableMapping.addOverrideManyToManyMapping.

INTERNAL: In JPA users may specify overrides to apply to a many to many mapping on a shared embeddable descriptor.
public void
addOverrideUnidirectionalOneToManyMapping(UnidirectionalOneToManyMapping mapping)

Implements org.eclipse.persistence.mappings.EmbeddableMapping.addOverrideUnidirectionalOneToManyMapping.

INTERNAL: In JPA users may specify overrides to apply to a unidirectional one to many mapping on a shared embeddable descriptor.
public void
addTargetForeignKeyField(DatabaseField targetForeignKey, DatabaseField sourceKey)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.addTargetForeignKeyField.

PUBLIC: Define the target foreign key relationship in the 1-M aggregate collection mapping.
public void
addTargetForeignKeyFieldName(String targetForeignKey, String sourceKey)

PUBLIC: Define the target foreign key relationship in the 1-M aggregate collection mapping.

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

Overrides org.eclipse.persistence.mappings.CollectionMapping.buildBackupCloneForPartObject.

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

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.buildBatchCriteria.

INTERNAL: Return the selection criteria used to IN batch fetching.
public Object
buildCloneForPartObject(Object
TODO
attributeValue
,
Object
TODO
original
,
CacheKey
TODO
cacheKey
,
Object
TODO
clone
,
AbstractSession
TODO
cloningSession
,
Integer
TODO
refreshCascade
,
boolean
TODO
isExisting
,
boolean
TODO
isFromSharedCache
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.buildCloneForPartObject.

INTERNAL: Require for cloning, the part must be cloned.
protected Object
buildElementBackupClone(Object element, UnitOfWorkImpl unitOfWork)

INTERNAL: Clone the aggregate collection, if necessary.

public Object
buildElementClone(Object element, Object parent, CacheKey parentCacheKey, Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)

Overrides org.eclipse.persistence.mappings.CollectionMapping.buildElementClone.

INTERNAL: Clone the aggregate collection, if necessary.
public Expression
buildExpression(Object
TODO
queryObject
,
QueryByExamplePolicy
TODO
policy
,
Expression
TODO
expressionBuilder
,
Map<K, V>
TODO
processedObjects
,
AbstractSession
TODO
session
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.buildExpression.

INTERNAL: In case Query By Example is used, this method builds and returns an expression that corresponds to a single attribute and it's value.
public void
cascadeDiscoverAndPersistUnregisteredNewObjects(Object
TODO
object
,
Map<K, V>
TODO
newObjects
,
Map<K, V>
TODO
unregisteredExistingObjects
,
Map<K, V>
TODO
visitedObjects
,
UnitOfWorkImpl
TODO
uow
,
Set<E>
TODO
cascadeErrors
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.cascadeDiscoverAndPersistUnregisteredNewObjects.

INTERNAL: Cascade discover and persist new objects during commit.
public void
cascadePerformRemoveIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.cascadePerformRemoveIfRequired.

INTERNAL: Cascade registerNew for Create through mappings that require the cascade
public void
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired.

INTERNAL: Cascade perform removal of orphaned private owned objects from the UnitOfWorkChangeSet
public void
cascadeRegisterNewIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.cascadeRegisterNewIfRequired.

INTERNAL: Cascade registerNew for Create through mappings that require the cascade
public Object
public void
collectQueryParameters(Set<DatabaseField>
TODO
cacheFields
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.collectQueryParameters.

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

Returns:

ChangeRecord
compareForChange
(Object
TODO
clone
,
Object
TODO
backUp
,
ObjectChangeSet
TODO
owner
,
AbstractSession
TODO
session
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.compareForChange.

INTERNAL: This method is used to create a change record from comparing two aggregate collections
public boolean
compareLists(List<E> firstList, List<E> secondList, AbstractSession session)

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

protected void
compareListsAndWrite(List<E> previousList, List<E> currentList, WriteObjectQuery query)

Overrides org.eclipse.persistence.mappings.CollectionMapping.compareListsAndWrite.

INTERNAL: Old and new lists are compared and only the changes are written to the database.
protected void
compareListsAndWrite_NonUpdatableListOrderField(List<E> previousList, List<E> currentList, WriteObjectQuery query)

INTERNAL: Old and new lists are compared and only the changes are written to the database.

protected void
compareListsAndWrite_UpdatableListOrderField(List<E> previousList, List<E> currentList, WriteObjectQuery query)

INTERNAL: Old and new lists are compared and only the changes are written to the database.

protected boolean
compareMapCollectionForChange(Map<K, V> cloneObjectCollection, Map<K, V> backUpCollection, AbstractSession session)

INTERNAL: Determine if an AggregateCollection that is contained as a map has changed by comparing the values in the clone to the values in the backup.

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

Overrides org.eclipse.persistence.mappings.CollectionMapping.compareObjects.

INTERNAL: Compare the attributes belonging to this mapping for the objects.
public void
convertClassNamesToClasses(ClassLoader
Where to search for classes.
classLoader
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.
protected ChangeRecord

Returns:

org.eclipse.persistence.internal.sessions.AggregateCollectionChangeRecord the changerecord representing this AggregateCollectionMapping
convertToChangeRecord
(Object
Object the collection to convert
cloneCollection
,
Object backupCollection, ObjectChangeSet
org.eclipse.persistence.internal.sessions.ObjectChangeSet the ChangeSet that uses this record
owner
,
AbstractSession
org.eclipse.persistence.internal.sessions.AbstractSession
session
)

INTERNAL: This method is used to convert the contents of an aggregateCollection into a changeRecord

protected Object
copyElement(Object original, CopyGroup group)

Overrides org.eclipse.persistence.mappings.CollectionMapping.copyElement.

INTERNAL: Copies member's value
public Object
createMapComponentFromRow(AbstractRecord dbRow, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected)

Implements org.eclipse.persistence.mappings.foundation.MapComponentMapping.createMapComponentFromRow.

INTERNAL Called when a DatabaseMapping is used to map the key in a collection.
protected void
deleteAll(DeleteObjectQuery query, AbstractSession session)

To delete all the entries matching the selection criteria from the table stored in the referenced descriptor

protected void
executeEvent(int eventCode, ObjectLevelModifyQuery query)

INTERNAL: Execute a descriptor event for the specified event code.

protected Object
extractBatchKeyFromRow(AbstractRecord row, AbstractSession session)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.extractBatchKeyFromRow.

INTERNAL: Extract the primary key value from the source row.
protected Object
extractKeyFromTargetRow(AbstractRecord row, AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.extractKeyFromTargetRow.

INTERNAL: Extract the source primary key value from the target row.
public AbstractRecord
getAggregateRow(ObjectLevelModifyQuery query, Object object)

INTERNAL: return the aggregate Record with the primary keys from the source table and target table

public InsertObjectQuery
getAndPrepareModifyQueryForInsert(ObjectLevelModifyQuery originalQuery, Object object)

INTERNAL: setup the modifyQuery for post insert/update and pre delete

protected Expression
getDeleteAllCriteria(AbstractSession session)

Delete all criteria is created with target foreign keys and source keys.

protected ModifyQuery
getDeleteAllQuery()

Overrides org.eclipse.persistence.mappings.CollectionMapping.getDeleteAllQuery.

Overrides CollectionMappig because this mapping requires a DeleteAllQuery instead of a ModifyQuery.
protected InsertObjectQuery
getInsertObjectQuery(AbstractSession session, ClassDescriptor desc)

INTERNAL: Returns a clone of InsertObjectQuery from the ClassDescriptor's DescriptorQueryManager or a new one

public ClassDescriptor
public ClassDescriptor
getReferenceDescriptor(Class<?> theClass, AbstractSession session)

INTERNAL: for inheritance purpose

public Vector<E>
getReferenceObjectKeys(ObjectLevelModifyQuery query)

INTERNAL: get reference object keys

public Vector<E>
getSourceKeyFieldNames()

PUBLIC: Return the source key field names associated with the mapping.

public Vector<DatabaseField>
getSourceKeyFields()

INTERNAL: Return the source key names associated with the mapping

public Vector<E>
getTargetForeignKeyFieldNames()

PUBLIC: Return the target foregin key field names associated with the mapping.

public Vector<DatabaseField>
getTargetForeignKeyFields()

INTERNAL: Return the target foregin key fields associated with the mapping

public Map<DatabaseField, DatabaseField>
public boolean
hasNestedIdentityReference()

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.hasNestedIdentityReference.

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

Overrides org.eclipse.persistence.mappings.CollectionMapping.initialize.

INTERNAL: For aggregate collection mapping the reference descriptor is cloned.
public void
initializeChildInheritance(ClassDescriptor parentDescriptor, AbstractSession session, HashMap<DatabaseField, DatabaseField> fieldTranslation, HashMap<DatabaseTable, DatabaseTable> tableTranslation)

INTERNAL: For aggregate mapping the reference descriptor is cloned.

protected void
initializeDeleteAllQuery(AbstractSession session)

INTERNAL: Initialize delete all query.

public void
initializeParentInheritance(ClassDescriptor parentDescriptor, ClassDescriptor childDescriptor, AbstractSession session, HashMap<DatabaseField, DatabaseField> fieldTranslation, HashMap<DatabaseTable, DatabaseTable> tableTranslation)

INTERNAL: For aggregate mapping the reference descriptor is cloned.

protected void
initializeReferenceDescriptor(AbstractSession session)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.initializeReferenceDescriptor.

Initialize and set the descriptor for the referenced class in this mapping.
protected void
initializeSelectionCriteria(AbstractSession session)

INTERNAL: Selection criteria is created with target foreign keys and source keys.

protected void
initializeTargetForeignKeyToSourceKeys(AbstractSession session)

INTERNAL: The foreign keys and the primary key names are converted to DatabaseFields and stored.

protected void
initializeTargetForeignKeyToSourceKeysWithDefaults(AbstractSession session)

INTERNAL: The foreign keys and the primary key names are converted to DatabaseFields and stored.

protected void
public boolean
public boolean
isCandidateForPrivateOwnedRemoval()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isCandidateForPrivateOwnedRemoval.

INTERNAL: AggregateCollection contents should not be considered for addition to the UnitOfWork private owned objects list for removal.
public boolean
isCascadedLockingSupported()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isCascadedLockingSupported.

INTERNAL Return true if this mapping supports cascaded version optimistic locking.
public boolean
isChangeTrackingSupported(Project project)

Overrides org.eclipse.persistence.mappings.CollectionMapping.isChangeTrackingSupported.

INTERNAL: Return if this mapping supports change tracking.
public boolean
public boolean
isJoiningSupported()

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.isJoiningSupported.

INTERNAL: Return if this mapping support joining.
public boolean
isListOrderFieldUpdatable()

PUBLIC: indicates whether listOrderField value could be updated in the db.

public boolean
public boolean
protected boolean
isSourceKeySpecified()

Checks if source key is specified or not.

public void
iterateOnElement(DescriptorIterator iterator, Object element)

Overrides org.eclipse.persistence.mappings.CollectionMapping.iterateOnElement.

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

Overrides org.eclipse.persistence.mappings.CollectionMapping.load.

Force instantiation of the load group.
public void
loadAll(Object object, AbstractSession session, IdentityHashSet loaded)

Overrides org.eclipse.persistence.mappings.CollectionMapping.loadAll.

Force instantiation of all indirections.
public void
mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession)

Overrides org.eclipse.persistence.mappings.CollectionMapping.mergeChangesIntoObject.

INTERNAL: Merge changes from the source to the target object.
public void
mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession)

Overrides org.eclipse.persistence.mappings.CollectionMapping.mergeIntoObject.

INTERNAL: Merge changes from the source to the target object.
protected void
objectAddedDuringUpdate(ObjectLevelModifyQuery query, Object objectAdded, ObjectChangeSet changeSet, Map<K, V> extraData)

Overrides org.eclipse.persistence.mappings.CollectionMapping.objectAddedDuringUpdate.

INTERNAL: An object was added to the collection during an update, insert it if private.
protected int
objectChangedListOrderDuringUpdate(WriteObjectQuery query, int iMin, int iMax, int iShift)

protected int
protected void
objectRemovedDuringUpdate(ObjectLevelModifyQuery query, Object objectDeleted, Map<K, V> extraData)

Overrides org.eclipse.persistence.mappings.CollectionMapping.objectRemovedDuringUpdate.

INTERNAL: An object was removed to the collection during an update, delete it if private.
protected void
objectUnchangedDuringUpdate(ObjectLevelModifyQuery query, Object object, Map<K, V> backupCloneKeyedCache, Object cachedKey)

Overrides org.eclipse.persistence.mappings.CollectionMapping.objectUnchangedDuringUpdate.

INTERNAL: An object is still in the collection, update it as it may have changed.
protected void
public void
postInitialize(AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.postInitialize.

INTERNAL: For aggregate collection mapping the reference descriptor is cloned.
public void
postInsert(WriteObjectQuery query)

Overrides org.eclipse.persistence.mappings.CollectionMapping.postInsert.

INTERNAL: Insert privately owned parts
protected void
postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)

Overrides org.eclipse.persistence.mappings.CollectionMapping.postPrepareNestedBatchQuery.

INTERNAL: Allow the mapping the do any further batch preparation.
public void
postUpdate(WriteObjectQuery writeQuery)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.postUpdate.

INTERNAL: Update the privately owned parts
public void
preDelete(DeleteObjectQuery query)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.preDelete.

INTERNAL: Delete privately owned parts
public void
preInsert(WriteObjectQuery query)

Overrides org.eclipse.persistence.mappings.CollectionMapping.preInsert.

INTERNAL: The message is passed to its reference class descriptor.
public void
prepareModifyQueryForDelete(ObjectLevelModifyQuery originalQuery, ObjectLevelModifyQuery modifyQuery, Object wrappedObject, Map<K, V> extraData)

INTERNAL: setup the modifyQuery for pre delete

public void
prepareModifyQueryForUpdate(ObjectLevelModifyQuery originalQuery, ObjectLevelModifyQuery modifyQuery, Object object)

INTERNAL: setup the modifyQuery for update,

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

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.prepareNestedJoins.

INTERNAL: Clone and prepare the JoinedAttributeManager nested JoinedAttributeManager.
public void
remoteInitialization(DistributedSession session)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.remoteInitialization.

INTERNAL: Once a descriptor is serialized to the remote session, all its mappings and reference descriptors are traversed.
public void
setDefaultSourceTable(DatabaseTable table)

PUBLIC: Set a default source table to use with the source fields of this mapping.

public void
setIsListOrderFieldUpdatable(boolean isUpdatable)

PUBLIC: indicates whether listOrderField value could be updated in the db.

protected void
public void
setSourceKeyFieldNames(Vector<E> fieldNames)

PUBLIC: Set the source key field names associated with the mapping.

public void
setSourceKeyFields(Vector<DatabaseField> sourceKeyFields)

INTERNAL: set all the primary key names associated with this mapping

public void
setTargetForeignKeyFieldNames(Vector<E> fieldNames)

PUBLIC: Set the target foregin key field names associated with the mapping.

public void
setTargetForeignKeyFields(Vector<DatabaseField> targetForeignKeyFields)

INTERNAL: set the target foregin key fields associated with the mapping

protected void
protected boolean
shouldObjectModifyCascadeToParts(ObjectLevelModifyQuery query)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.shouldObjectModifyCascadeToParts.

Returns true as any process leading to object modification should also affect its privately owned parts Usually used by write, insert, update and delete.
public void
simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.simpleAddToCollectionChangeRecord.

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.
public void
simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.simpleRemoveFromCollectionChangeRecord.

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.
protected static void
translateTablesAndFields(ClassDescriptor descriptor, HashMap<DatabaseField, DatabaseField> fieldTranslation, HashMap<DatabaseTable, DatabaseTable> tableTranslation)

INTERNAL: Called in case fieldTranslation != null Sets new primary keys, tables, appends fieldTranslation to fieldMap so that all fields in mappings, inheritance etc. translated to the new ones.

protected void
updateNestedAggregateMappings(ClassDescriptor descriptor, AbstractSession session)

INTERNAL: Called in case nestedAggregateToSourceFieldNames != null Updates AggregateObjectMappings and AggregateCollectionMappings of the reference descriptor.

public boolean
verifyDelete(Object object, AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.verifyDelete.

INTERNAL: Checks if object is deleted from the database or not.
protected void
verifyDeleteForUpdate(DeleteObjectQuery query)

Verifying deletes make sure that all the records privately owned by this mapping are actually removed.

Inherited from org.eclipse.persistence.mappings.CollectionMapping:
addAggregateOrderByaddAscendingOrderingaddDescendingOrderingaddOrderBybuildChangeRecordbuildContainerClonebuildCopybuildElementUnitOfWorkClonebuildListOrderFieldbuildReferencesPKListcalculateDeferredChangescompareCollectionsForChangecompareListscompareObjectsAndWritecompareObjectsWithoutPrivateOwnedcompareObjectsWithPrivateOwnedexecuteBatchQueryextractResultFromBatchQueryfixRealObjectReferencesgetAdditionalFieldsBaseExpressiongetContainerPolicygetJoinCriteriagetListOrderFieldgetObjectCorrespondingTogetOrderByQueryKeyExpressionsgetOrderCorrectionTypegetRealCollectionAttributeValueFromObjectgetSelectionQueryContainerPolicygetTargetPrimaryKeyFieldshasCustomDeleteAllQueryhasOrderByinitializeChangeOrderTargetQueryinitializeListOrderFieldinitializeListOrderFieldTableisAttributeValueInstantiatedOrChangedisCollectionMappingisListOrderFieldSupportedisMapKeyObjectRelationshipiterateOnRealAttributeValuemustDeleteReferenceObjectsOneByOneobjectOrderChangedDuringUpdateobjectUnchangedDuringUpdatepostCalculateChangespostDeleteprepareTranslationRowpreUpdatereadPrivateOwnedForObjectrecordPrivateOwnedRemovalsreplaceValueHoldersInsetChangeListenersetContainerPolicysetCustomDeleteAllQuerysetDeleteAllCallsetDeleteAllQuerysetDeleteAllSQLStringsetHasCustomDeleteAllQuerysetListOrderFieldsetListOrderFieldNamesetMustDeleteReferenceObjectsOneByOnesetOrderCorrectionTypesetSelectionQueryContainerPolicysetSessionNamesetUseLazyInstantiationForIndirectCollectionshouldUseLazyInstantiationForIndirectCollectionshouldUseListOrderFieldTableExpressionupdateChangeRecordupdateChangeRecordForSelfMergeupdateCollectionChangeRecorduseCollectionClassuseCollectionClassNameuseListClassNameuseMapClassuseMapClassuseMapClassNameuseSortedSetClassuseSortedSetClassNameuseSortedSetClassNameuseTransparentCollectionuseTransparentListuseTransparentMapuseTransparentSetvalidateBeforeInitializationvalueFromPKListvalueFromRowInternalWithJoinwriteChanges