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

public Class DirectCollectionMapping

extends CollectionMapping
implements RelationalMapping
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.mappings.RelationalMapping
Known Direct Subclasses
org.eclipse.persistence.mappings.DirectMapMapping
Imports
java.beans.PropertyChangeEvent, java.security.AccessController, .PrivilegedActionException, java.util.ArrayList, .Enumeration, .HashMap, .HashSet, .IdentityHashMap, .Iterator, .List, .Map, .Set, .Vector, org.eclipse.persistence.annotations.BatchFetchType, org.eclipse.persistence.descriptors.ClassDescriptor, .TablePerMultitenantPolicy, org.eclipse.persistence.descriptors.changetracking.ChangeTracker, .CollectionChangeEvent, org.eclipse.persistence.exceptions.ConversionException, .DatabaseException, .DescriptorException, .QueryException, .ValidationException, org.eclipse.persistence.expressions.Expression, .ExpressionBuilder, org.eclipse.persistence.history.AsOfClause, .HistoryPolicy, org.eclipse.persistence.indirection.IndirectCollection, .IndirectList, .ValueHolder, org.eclipse.persistence.internal.databaseaccess.Platform, org.eclipse.persistence.internal.descriptors.DescriptorIterator, .ObjectBuilder, org.eclipse.persistence.internal.descriptors.changetracking.AttributeChangeListener, .ObjectChangeListener, org.eclipse.persistence.internal.expressions.ForUpdateClause, .ObjectExpression, .SQLDeleteStatement, .SQLInsertStatement, .SQLSelectStatement, .SQLUpdateStatement, .TableExpression, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, .DatabaseTable, .Helper, .NonSynchronizedVector, org.eclipse.persistence.internal.identitymaps.CacheId, .CacheKey, org.eclipse.persistence.internal.queries.ContainerPolicy, .JoinedAttributeManager, .OrderedListContainerPolicy, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, .PrivilegedNewInstanceFromClass, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .ChangeRecord, .DirectCollectionChangeRecord, .MergeManager, .ObjectChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.internal.sessions.remote.ObjectDescriptor, .RemoteSessionController, org.eclipse.persistence.mappings.converters.Converter, .ObjectTypeConverter, .SerializedObjectConverter, .TypeConversionConverter, org.eclipse.persistence.queries.DataModifyQuery, .DataReadQuery, .DatabaseQuery, .DeleteObjectQuery, .DirectReadQuery, .ModifyQuery, .ObjectBuildingQuery, .ObjectLevelReadQuery, .QueryByExamplePolicy, .ReadAllQuery, .ReadQuery, .ReportQuery, .WriteObjectQuery, org.eclipse.persistence.sessions.CopyGroup, .DatabaseRecord, org.eclipse.persistence.sessions.remote.DistributedSession

Purpose: This mapping is used to store a collection of simple types (String, Number, Date, etc.) into a single table. The table must store the value and a foreign key to the source object. A converter can be used if the desired object type and the data type do not match.

Author
Sati
Since
TOPLink/Java 1.0 09/18/2009-2.0 Michael O'Brien - 266912: JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API) add support for passing BasicMap value type to MapAttributeImpl via new attributeClassification field
See Also
Converter, ObjectTypeConverter, TypeConversionConverter, SerializedObjectConverter

Field Summary

Modifier and TypeField and Description
protected transient Class<?>
protected String
protected transient ModifyQuery
protected ModifyQuery
changeSetDeleteQuery

Used for deletion when ChangeSets are used

protected static final String
Delete

Used for data modification events.

protected static final String
protected static final String
protected ModifyQuery
deleteAtIndexQuery

Used (only in case listOrderField != null) to delete object with particular orderFieldValue

protected DatabaseField
directField

The direct field name is converted and stored

protected boolean
protected boolean
protected boolean
protected boolean
protected HistoryPolicy
protected static final String
protected DataModifyQuery
insertQuery

Used for insertion for m-m and dc, not used in 1-m.

protected List<Expression>
protected Vector<DatabaseField>
protected DatabaseTable
referenceTable

Stores the reference table

protected Vector<DatabaseField>
protected static final String
protected ModifyQuery
updateAtIndexQuery

Used (only in case listOrderField != null) to update orderFieldValue of object with particular orderFieldValue

protected Converter
valueConverter

Allows user defined conversion between the object value and the database value.

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

Constructor Summary

AccessConstructor and Description
public
DirectCollectionMapping()

PUBLIC: Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addAscendingOrdering()

PUBLIC: Provide ascending order support for this direct collection mapping.

public void
addDescendingOrdering()

PUBLIC: Provide descending order support for this direct collection mapping.

public void
addOrdering(Expression expression)

ADVANCED: Used this method to add custom ordering expressions when fetching the collection.

public void
addReferenceKeyField(DatabaseField referenceForeignKeyField, DatabaseField sourcePrimaryKeyField)

PUBLIC: Add the reference key field.

public void
addReferenceKeyFieldName(String referenceForeignKeyFieldName, String sourcePrimaryKeyFieldName)

PUBLIC: Add the name of the reference key field.

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 void
buildCopy(Object
TODO
copy
,
Object
TODO
original
,
CopyGroup
TODO
group
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.buildCopy.

INTERNAL: Copy of the attribute of the object.
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 element, 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.
protected void
buildListOrderField()

Overrides org.eclipse.persistence.mappings.CollectionMapping.buildListOrderField.

INTERNAL: Verifies listOrderField's table: it must be reference table.
public void
calculateDeferredChanges(ChangeRecord
TODO
changeRecord
,
AbstractSession
TODO
session
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.calculateDeferredChanges.

INTERNAL: Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes as apposed to detected changes.
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 perform delete 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
clone()

Overrides org.eclipse.persistence.mappings.CollectionMapping.clone.

INTERNAL: The mapping clones itself to create deep copy.
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 void
compareCollectionsForChange(Object oldCollection, Object newCollection, ChangeRecord changeRecord, AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.compareCollectionsForChange.

INTERNAL: This method is used to calculate the differences between two collections.
public ChangeRecord
compareForChange(Object
TODO
clone
,
Object
TODO
backUp
,
ObjectChangeSet
TODO
owner
,
AbstractSession
TODO
session
)

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

INTERNAL: This method compares the changes between two direct collections.
protected boolean
compareLists(List<E> firstList, List<E> secondList)

Compare two lists.

public void
compareListsForChange(List<E> oldList, List<E> newList, ChangeRecord changeRecord, AbstractSession session)

INTERNAL: This method is used to calculate the differences between two Lists.

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
TODO
classLoader
)

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

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 Expression
protected Expression
protected void
executeBatchQuery(DatabaseQuery query, CacheKey parentCacheKey, Map<K, V> referenceDataByKey, AbstractSession session, AbstractRecord translationRow)

Overrides org.eclipse.persistence.mappings.CollectionMapping.executeBatchQuery.

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 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 reference direct row.
public void
fixRealObjectReferences(Object
TODO
object
,
Map<Object, ObjectDescriptor>
TODO
objectInformation
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
,
DistributedSession
TODO
session
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.fixRealObjectReferences.

INTERNAL: At this point, we realize we don't have indirection; so we need to replace the reference object(s) with the corresponding object(s) from the remote session.
protected Expression
getAdditionalFieldsBaseExpression(ReadQuery query)

Overrides org.eclipse.persistence.mappings.CollectionMapping.getAdditionalFieldsBaseExpression.

INTERNAL: Return the base expression to use for adding fields to the query.
public Class<?>
getAttributeClassification()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getAttributeClassification.

PUBLIC: Some databases do not properly support all of the base data types.
public String
getAttributeClassificationName()

INTERNAL: Return the class name of the attribute type.

protected ModifyQuery
protected ModifyQuery
protected ModifyQuery
public DatabaseField
getDirectField()

INTERNAL: Return the direct field.

public String
getDirectFieldName()

PUBLIC: Returns the name of the field name in the reference table.

public Vector<E>
getFieldsForTranslationInAggregate()

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.getFieldsForTranslationInAggregate.

INTERNAL: Return source key fields for translation by an AggregateObjectMapping
public Object
getFieldValue(Object attributeValue, AbstractSession session)

INTERNAL: Convert the attribute value to a field value.

public HistoryPolicy
getHistoryPolicy()

PUBLIC: Allow history support on the reference table.

protected DataModifyQuery
public Expression
getJoinCriteria(ObjectExpression context, Expression base)

Overrides org.eclipse.persistence.mappings.CollectionMapping.getJoinCriteria.

INTERNAL: Returns the join criteria stored in the mapping selection query.
public Object
getObjectCorrespondingTo(Object
TODO
object
,
DistributedSession
TODO
session
,
Map<Object, ObjectDescriptor>
TODO
objectDescriptors
,
Map<Object, Object>
TODO
processedObjects
,
ObjectLevelReadQuery
TODO
query
)

Overrides org.eclipse.persistence.mappings.CollectionMapping.getObjectCorrespondingTo.

INTERNAL: return the object on the client corresponding to the specified object.
public Object
getObjectValue(Object fieldValue, AbstractSession session)

INTERNAL: Convert the field value to an attribute value.

public List<Expression>
getOrderByExpressions()

PUBLIC: Return the order by expression.

public List<Expression>
public Class<?>
getReferenceClass()

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.getReferenceClass.

INTERNAL: This cannot be used with direct collection mappings.
public String
public ClassDescriptor
public Vector<E>
getReferenceKeyFieldNames()

INTERNAL: Return the reference key field names associated with the mapping.

public Vector<DatabaseField>
getReferenceKeyFields()

INTERNAL: Return the reference key fields.

public DatabaseTable
getReferenceTable()

INTERNAL: Return the direct table.

public String
getReferenceTableName()

PUBLIC: Returns the name of the reference table

public String
getReferenceTableQualifiedName()

PUBLIC: Returns the qualified name of the reference table.

public DatabaseMapping
getRelationshipPartner()

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.getRelationshipPartner.

INTERNAL: Return the relationshipPartner mapping for this bi-directional mapping.
public Vector<E>
getSelectFields()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getSelectFields.

INTERNAL: Returns the set of fields that should be selected to build this mapping's value(s).
protected ContainerPolicy
getSelectionQueryContainerPolicy()

Overrides org.eclipse.persistence.mappings.CollectionMapping.getSelectionQueryContainerPolicy.

INTERNAL: Get the container policy from the selection query for this mapping.
public Vector<E>
getSelectTables()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getSelectTables.

INTERNAL: Returns the table(s) that should be selected to build this mapping's value(s).
public Vector<E>
getSourceKeyFieldNames()

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

public Vector<DatabaseField>
getSourceKeyFields()

INTERNAL: Return the source key fields.

protected ModifyQuery
public Converter
getValueConverter()

PUBLIC: Return the converter on the mapping.

protected boolean
protected boolean
protected boolean
protected boolean
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: Initialize and validate the mapping properties.
protected void
initializeDeleteAllQuery(AbstractSession session)

Initialize delete all query.

protected void
protected void
protected void
protected void
initializeDirectField(AbstractSession session)

The field name on the reference table is initialized and cached.

protected void
initializeInsertQuery(AbstractSession session)

Initialize insert query.

protected void
protected void
protected void
initializeReferenceKeys(AbstractSession session)

The reference keys on the reference table are initialized

protected void
initializeReferenceTable(AbstractSession session)

Set the table qualifier on the reference table if required

protected void
protected void
protected void
protected void
initializeSourceKeys(AbstractSession session)

The source keys are initialized

protected void
initializeSourceKeysWithDefaults(AbstractSession session)

INTERNAL: If a user does not specify the source key then the primary keys of the source table are used.

protected void
protected void
initOrRebuildSelectQuery()

INTERNAL: Used by DirectMapMapping to rebuild select query.

public boolean
isCandidateForPrivateOwnedRemoval()

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

INTERNAL: DirectCollectionMapping 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
public boolean
public boolean
isJoiningSupported()

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

INTERNAL: Return if this mapping support joining.
protected boolean
isKeyForSourceSpecified()

INTERNAL: Checks if source and target keys are mentioned by the user or not.

public boolean
isLockableMapping()

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.isLockableMapping.

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

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isRelationalMapping.

INTERNAL: All relational mappings should implement this method to return true.
public void
iterateOnElement(DescriptorIterator iterator, Object element)

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

INTERNAL: Iterate on the specified element.
public void
iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue)

Overrides org.eclipse.persistence.mappings.CollectionMapping.iterateOnRealAttributeValue.

INTERNAL: Iterate on the attribute value.
protected void
mergeAddRemoveChanges(Object valueOfTarget, Object delegateTarget, DirectCollectionChangeRecord changeRecord, MergeManager mergeManager, AbstractSession session)

INTERNAL: Merge changes by adding and removing from the change record to the target object, and its delegate object if instance of IndirectCollection.

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.
public void
public void
postCalculateChanges(ChangeRecord changeRecord, UnitOfWorkImpl uow)

Overrides org.eclipse.persistence.mappings.CollectionMapping.postCalculateChanges.

INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated.
public void
postInsert(WriteObjectQuery query)

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

INTERNAL: Insert the private owned object.
public void
postUpdate(WriteObjectQuery writeQuery)

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

INTERNAL: Update private owned part.
protected void
postUpdateWithChangeSet(WriteObjectQuery writeQuery)

INTERNAL: Update private owned part.

protected void
postUpdateWithChangeSetListOrder(WriteObjectQuery writeQuery)

INTERNAL: Update private owned part.

public void
preDelete(DeleteObjectQuery query)

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

INTERNAL: Delete private owned part.
public ReadQuery
prepareNestedBatchQuery(ObjectLevelReadQuery query)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.prepareNestedBatchQuery.

INTERNAL: Clone and prepare the selection query as a nested batch read query.
public ObjectLevelReadQuery
prepareNestedJoins(JoinedAttributeManager joinManager, ObjectBuildingQuery baseQuery, AbstractSession session)

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

INTERNAL: Clone and prepare the joined direct query.
protected void
prepareTranslationRow(AbstractRecord translationRow, Object object, ClassDescriptor descriptor, AbstractSession session)

Overrides org.eclipse.persistence.mappings.CollectionMapping.prepareTranslationRow.

INTERNAL: The translation row may require additional fields than the primary key if the mapping in not on the primary key.
public void
recordPrivateOwnedRemovals(Object object, UnitOfWorkImpl uow)

Overrides org.eclipse.persistence.mappings.CollectionMapping.recordPrivateOwnedRemovals.

INTERNAL: Overridden by mappings that require additional processing of the change record after the record has been calculated.
public void
remoteInitialization(DistributedSession session)

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

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

Overrides org.eclipse.persistence.mappings.CollectionMapping.replaceValueHoldersIn.

INTERNAL: replace the value holders in the specified reference object(s)
public void
setAttributeClassification(Class<?> attributeClassification)

PUBLIC: Some databases do not properly support all of the base data types.

public void
setAttributeClassificationName(String attributeClassificationName)

INTERNAL: Set the name of the class for MW usage.

public void
public void
setCustomDeleteAtIndexQuery(ModifyQuery query)

PUBLIC: The default delete by index query for this mapping can be overridden by specifying the new query.

public void
setCustomDeleteQuery(ModifyQuery query)

PUBLIC: The default delete query for this mapping can be overridden by specifying the new query.

public void
setCustomInsertQuery(DataModifyQuery query)

PUBLIC: The default insert query for mapping can be overridden by specifying the new query.

public void
setCustomUpdateAtIndexQuery(ModifyQuery query)

PUBLIC: The default delete by index query for this mapping can be overridden by specifying the new query.

protected void
public void
setDeleteSQLString(String sqlString)

PUBLIC: Set the receiver's delete SQL string.

public void
setDirectField(DatabaseField field)

PUBLIC: Set the direct field in the reference table.

public void
setDirectFieldClassification(Class<?> fieldType)

ADVANCED: Set the class type of the field value.

public void
setDirectFieldClassificationName(String className)

ADVANCED: Set the class type of the field value.

public void
setDirectFieldName(String fieldName)

PUBLIC: Set the direct field name in the reference table.

protected void
protected void
public void
setHistoryPolicy(HistoryPolicy policy)

PUBLIC: Support history on the reference table.

protected void
public void
setInsertSQLString(String sqlString)

PUBLIC: Set the receiver's insert SQL string.

public void
setReferenceClass(Class<?> referenceClass)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.setReferenceClass.

INTERNAL: This cannot be used with direct collection mappings.
public void
public void
setReferenceKeyFieldName(String fieldName)

PUBLIC: Set the name of the reference key field.

public void
setReferenceKeyFieldNames(Vector<E> fieldNames)

INTERNAL: Set the reference key field names associated with the mapping.

public void
setReferenceKeyFields(Vector<DatabaseField> aVector)

INTERNAL: Set the reference fields.

public void
setReferenceTable(DatabaseTable table)

INTERNAL: Set the reference table.

public void
setReferenceTableName(String tableName)

PUBLIC: Set the reference table name.

public void
setSelectionCriteria(Expression anExpression)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.setSelectionCriteria.

PUBLIC: Sets the selection criteria to be used as a where clause to read reference objects.
protected void
setSelectionQueryContainerPolicy(ContainerPolicy containerPolicy)

Overrides org.eclipse.persistence.mappings.CollectionMapping.setSelectionQueryContainerPolicy.

INTERNAL: Set the container policy on the selection query for this mapping.
public void
setSessionName(String name)

Overrides org.eclipse.persistence.mappings.CollectionMapping.setSessionName.

PUBLIC: Set the name of the session to execute the mapping's queries under.
public void
setSourceKeyFieldNames(Vector<E> fieldNames)

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

public void
setSourceKeyFields(Vector<DatabaseField> sourceKeyFields)

INTERNAL: Set the source fields.

public void
setValueConverter(Converter valueConverter)

PUBLIC: Set the converter on the mapping.

public void
setValueConverterClassName(String valueConverterClassName)

PUBLIC: Set the converter class name on the mapping.

public boolean
shouldUseListOrderFieldTableExpression()

Overrides org.eclipse.persistence.mappings.CollectionMapping.shouldUseListOrderFieldTableExpression.

INTERNAL: Indicates whether getListOrderFieldExpression method should create field expression on table expression.
public void
simpleAddToCollectionChangeRecord(Object referenceKey, Object objectToAdd, 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.
protected void
simpleAddToCollectionChangeRecord(Object objectToAdd, Integer index, boolean isSet, ObjectChangeSet changeSet, AbstractSession session, boolean isChangeApplied)

public void
simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object objectToRemove, 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 void
simpleRemoveFromCollectionChangeRecord(Object objectToRemove, Integer index, boolean isSet, ObjectChangeSet changeSet, AbstractSession session, boolean isChangeApplied)

public void
updateChangeRecord(Object clone, Object newValue, Object oldValue, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow)

Overrides org.eclipse.persistence.mappings.CollectionMapping.updateChangeRecord.

INTERNAL: Either create a new change record or update with the new value.
public void
updateCollectionChangeRecord(CollectionChangeEvent event, ObjectChangeSet changeSet, UnitOfWorkImpl uow)

Overrides org.eclipse.persistence.mappings.CollectionMapping.updateCollectionChangeRecord.

INTERNAL: Add or removes a new value and its change set to the collection change record based on the event passed in. This is used by attribute change tracking.
public void
useMapClass(Class<?> concreteClass, String methodName)

Overrides org.eclipse.persistence.mappings.CollectionMapping.useMapClass.

Implements org.eclipse.persistence.mappings.ContainerMapping.useMapClass.

PUBLIC: It is illegal to use a Map as the container of a DirectCollectionMapping.
public Object
valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession session, boolean isTargetProtected, Boolean[] wasCacheUsed)

Overrides org.eclipse.persistence.mappings.ForeignReferenceMapping.valueFromRow.

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

Overrides org.eclipse.persistence.mappings.CollectionMapping.valueFromRowInternalWithJoin.

INTERNAL: Return the value of the field from the row or a value holder on the query to obtain the object.
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.
Inherited from org.eclipse.persistence.mappings.CollectionMapping:
addAggregateOrderByaddAscendingOrderingaddDescendingOrderingaddOrderBybuildBackupCloneForPartObjectbuildChangeRecordbuildCloneForPartObjectbuildContainerClonebuildElementUnitOfWorkClonebuildReferencesPKListcompareListscompareListsAndWritecompareObjectsAndWritecompareObjectsWithoutPrivateOwnedcompareObjectsWithPrivateOwnedcopyElementextractResultFromBatchQuerygetContainerPolicygetDeleteAllQuerygetListOrderFieldgetOrderByQueryKeyExpressionsgetOrderCorrectionTypegetRealCollectionAttributeValueFromObjectgetTargetPrimaryKeyFieldshasCustomDeleteAllQueryhasOrderByinitializeChangeOrderTargetQueryinitializeListOrderFieldTableisAttributeValueInstantiatedOrChangedisChangeTrackingSupportedisCollectionMappingisListOrderFieldSupportedisMapKeyObjectRelationshiploadloadAllmustDeleteReferenceObjectsOneByOneobjectAddedDuringUpdateobjectOrderChangedDuringUpdateobjectRemovedDuringUpdateobjectUnchangedDuringUpdateobjectUnchangedDuringUpdatepostDeletepostInitializepostPrepareNestedBatchQuerypreInsertpreUpdatereadPrivateOwnedForObjectsetChangeListenersetCustomDeleteAllQuerysetDeleteAllCallsetDeleteAllQuerysetDeleteAllSQLStringsetHasCustomDeleteAllQuerysetListOrderFieldsetListOrderFieldNamesetMustDeleteReferenceObjectsOneByOnesetOrderCorrectionTypesetUseLazyInstantiationForIndirectCollectionshouldUseLazyInstantiationForIndirectCollectionupdateChangeRecordForSelfMergeuseCollectionClassuseCollectionClassNameuseListClassNameuseMapClassuseMapClassNameuseSortedSetClassuseSortedSetClassNameuseSortedSetClassNameuseTransparentCollectionuseTransparentListuseTransparentMapuseTransparentSetvalidateBeforeInitializationvalueFromPKListwriteChanges