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

public abstract Class AbstractCompositeCollectionMapping

extends AggregateMapping
implements ContainerMapping, ArrayCollectionMapping
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.mappings.structures.ArrayCollectionMapping, org.eclipse.persistence.mappings.ContainerMapping
Known Direct Subclasses
org.eclipse.persistence.mappings.structures.ObjectArrayMapping, org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping, org.eclipse.persistence.eis.mappings.EISCompositeCollectionMapping
Imports
java.util.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.internal.descriptors.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.internal.identitymaps.CacheKey, org.eclipse.persistence.internal.queries.*, org.eclipse.persistence.internal.sessions.*, org.eclipse.persistence.internal.sessions.remote.ObjectDescriptor, org.eclipse.persistence.mappings.*, org.eclipse.persistence.mappings.converters.Converter, org.eclipse.persistence.mappings.structures.ArrayCollectionMapping, .ArrayCollectionMappingHelper, org.eclipse.persistence.queries.*, org.eclipse.persistence.sessions.remote.*, org.eclipse.persistence.sessions.CopyGroup

Define an embedded collection of objects. This is used in structured data-types, such as EIS, NoSQL and object-relational Array (varray, nested table) data-types. The target objects must be aggregate (embedded) and are stored with the parent object.

Field Summary

Modifier and TypeField and Description
private ContainerPolicy
containerPolicy

This determines the type of container used to hold the aggregate objects.

protected Converter
converter

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

protected DatabaseField
field

The aggregate objects are stored in a single field.

Inherited from org.eclipse.persistence.mappings.AggregateMapping:
hasNestedIdentityReferencereferenceClassreferenceClassNamereferenceDescriptor

Constructor Summary

AccessConstructor and Description
protected
AbstractCompositeCollectionMapping()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public Object
buildAddedElementFromChangeSet(Object changeSet, MergeManager mergeManager, AbstractSession targetSession)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.buildAddedElementFromChangeSet.

INTERNAL: Build and return a new element based on the change set.
protected Object
buildBackupClonePart(Object attributeValue, UnitOfWorkImpl unitOfWork)

Overrides org.eclipse.persistence.mappings.AggregateMapping.buildBackupClonePart.

Build and return a backup clone of the attribute.
public Object
buildChangeSet(Object element, ObjectChangeSet owner, AbstractSession session)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.buildChangeSet.

INTERNAL: Build and return a change set for the specified element.
protected Object
buildClonePart(Object original, Object clone, CacheKey cacheKey, Object attributeValue, Integer refreshCascade, AbstractSession clonningSession)

Overrides org.eclipse.persistence.mappings.AggregateMapping.buildClonePart.

Build and return a clone of the attribute.
protected abstract Object
buildCompositeObject(ClassDescriptor descriptor, AbstractRecord nestedRow, ObjectBuildingQuery query, CacheKey parentCacheKey, JoinedAttributeManager joinManger, AbstractSession targetSession)

protected abstract AbstractRecord
protected Object
protected Object
buildElementFromChangeSet(Object changeSet, MergeManager mergeManager, AbstractSession targetSession)

Build and return a new element based on the change set.

public Object
buildElementFromElement(Object element, MergeManager mergeManager, AbstractSession targetSession)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.buildElementFromElement.

INTERNAL: Build and return a new element based on the specified element.
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.AggregateMapping.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 Object
buildRemovedElementFromChangeSet(Object changeSet, MergeManager mergeManager, AbstractSession targetSession)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.buildRemovedElementFromChangeSet.

INTERNAL: Build and return a new element based on the change set.
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.DatabaseMapping.cascadeDiscoverAndPersistUnregisteredNewObjects.

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

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadePerformRemoveIfRequired.

INTERNAL: Cascade perform delete through mappings that require the cascade
public void
cascadeRegisterNewIfRequired(Object
TODO
object
,
UnitOfWorkImpl
TODO
uow
,
Map<K, V>
TODO
visitedObjects
)

Implements abstract org.eclipse.persistence.mappings.DatabaseMapping.cascadeRegisterNewIfRequired.

INTERNAL: Cascade registerNew for Create through mappings that require the cascade
protected Vector<E>
collectFields()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.collectFields.

Return the fields handled by the mapping.
public boolean
compareElements(Object element1, Object element2, AbstractSession session)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.compareElements.

INTERNAL: Compare the non-null elements and return true if they are alike.
public boolean
compareElementsForChange(Object element1, Object element2, AbstractSession session)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.compareElementsForChange.

INTERNAL: Compare the non-null elements and return true if they are alike.
public ChangeRecord
compareForChange(Object
TODO
clone
,
Object
TODO
backup
,
ObjectChangeSet
TODO
owner
,
AbstractSession
TODO
session
)

Overrides org.eclipse.persistence.mappings.AggregateMapping.compareForChange.

INTERNAL: Build and return the change record that results from comparing the two direct collection attributes.
public boolean
compareObjects(Object
TODO
object1
,
Object
TODO
object2
,
AbstractSession
TODO
session
)

Overrides org.eclipse.persistence.mappings.AggregateMapping.compareObjects.

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

Overrides org.eclipse.persistence.mappings.AggregateMapping.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.
protected ChangeRecord
public Object
createMapComponentFromRow(AbstractRecord dbRow, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected)

INTERNAL Called when a DatabaseMapping is used to map the key in a collection.

protected void
fixAttributeValue(Object attributeValue, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, DistributedSession session)

Overrides org.eclipse.persistence.mappings.AggregateMapping.fixAttributeValue.

An object has been serialized from the server to the remote client.
protected Object
public ContainerPolicy
public Converter
getConverter()

PUBLIC: Return the converter on the mapping.

public DatabaseField
getField()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.getField.

INTERNAL: Return the field mapped by this mapping.
public Object
protected String
getStructureName()

This is required for ObjectArrayMapping which defines a name for the collection type.

public boolean
hasConverter()

PUBLIC: Indicates if there is a converter on the mapping.

public void
initialize(AbstractSession session)

Overrides org.eclipse.persistence.mappings.AggregateMapping.initialize.

INTERNAL: The mapping is initialized with the given session.
public boolean
public boolean
isCollectionMapping()

Overrides org.eclipse.persistence.mappings.DatabaseMapping.isCollectionMapping.

INTERNAL: Related mapping should implement this method to return true.
protected void
iterateOnAttributeValue(DescriptorIterator descriptorIterator, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.iterateOnAttributeValue.

Iterate on the specified attribute value.
public boolean
mapKeyHasChanged(Object element, AbstractSession session)

Implements org.eclipse.persistence.mappings.structures.ArrayCollectionMapping.mapKeyHasChanged.

INTERNAL: Return whether the element's user-defined Map key has changed since it was cloned from the original version.
public void
mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession)

Overrides org.eclipse.persistence.mappings.AggregateMapping.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.AggregateMapping.mergeIntoObject.

INTERNAL: Merge changes from the source to the target object.
public void
postDeleteAttributeValue(DeleteObjectQuery query, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.postDeleteAttributeValue.

The message is passed to its reference class descriptor.
public void
postInsertAttributeValue(WriteObjectQuery query, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.postInsertAttributeValue.

The message is passed to its reference class descriptor.
public void
postUpdateAttributeValue(WriteObjectQuery query, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.postUpdateAttributeValue.

The message is passed to its reference class descriptor.
public void
preDeleteAttributeValue(DeleteObjectQuery query, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.preDeleteAttributeValue.

The message is passed to its reference class descriptor.
public void
preInsertAttributeValue(WriteObjectQuery query, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.preInsertAttributeValue.

The message is passed to its reference class descriptor.
public void
preUpdateAttributeValue(WriteObjectQuery query, Object attributeValue)

Overrides org.eclipse.persistence.mappings.AggregateMapping.preUpdateAttributeValue.

The message is passed to its reference class descriptor.
public void
setContainerPolicy(ContainerPolicy containerPolicy)

Implements org.eclipse.persistence.mappings.ContainerMapping.setContainerPolicy.

ADVANCED: Set the mapping's containerPolicy.
public void
setConverter(Converter converter)

PUBLIC: Set the converter on the mapping.

public void
setField(DatabaseField field)

Set the field in the mapping.

public void
simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.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.DatabaseMapping.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.
public void
useCollectionClass(Class<?> concreteContainerClass)

Implements org.eclipse.persistence.mappings.ContainerMapping.useCollectionClass.

PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.
public void
useCollectionClassName(String concreteContainerClassName)

Implements org.eclipse.persistence.mappings.ContainerMapping.useCollectionClassName.

PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.
public void
useListClassName(String concreteContainerClassName)

Implements org.eclipse.persistence.mappings.ContainerMapping.useListClassName.

PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.
public void
useMapClass(Class<?> concreteContainerClass, String methodName)

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

PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.
public void
useMapClassName(String concreteContainerClassName, String methodName)

Implements org.eclipse.persistence.mappings.ContainerMapping.useMapClassName.

PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.
public Object
valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.valueFromRow.

INTERNAL: Build and return an aggregate collection from the specified row.
protected boolean
verifyDeleteOfAttributeValue(Object attributeValue, AbstractSession session)

Overrides org.eclipse.persistence.mappings.AggregateMapping.verifyDeleteOfAttributeValue.

Return whether the specified object and all its components have been deleted.
public void
writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.writeFromObjectIntoRow.

INTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.
public void
writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, AbstractRecord row)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.writeFromObjectIntoRowForUpdate.

INTERNAL: Get the attribute value from the object and add the changed values to the specified database row.
public void
writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session, DatabaseMapping.WriteType writeType)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.writeFromObjectIntoRowWithChangeRecord.

INTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.
public void
writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session)

Overrides org.eclipse.persistence.mappings.DatabaseMapping.writeInsertFieldsIntoRow.

INTERNAL: Write fields needed for insert into the template with null values.
Inherited from org.eclipse.persistence.mappings.AggregateMapping:
buildAggregateDeleteQuerybuildAggregateModifyQuerybuildAggregateWriteQuerybuildBackupClonebuildClonebuildCloneFromRowbuildClonePartbuildCopybuildNewMergeInstanceOfcompareAttributeValuesexecuteEventfixObjectReferencesgetObjectBuildergetObjectBuilderForClassgetQueryManagergetReferenceClassgetReferenceClassNamegetReferenceDescriptorgetReferenceDescriptorgetReferenceDescriptorhasNestedIdentityReferenceisAggregateMappingiterateloadloadAllmergeAttributeValuepostDeletepostInsertpostUpdatepreDeletepreInsertpreUpdateremoteInitializationsetReferenceClasssetReferenceClassNamesetReferenceDescriptorupdateChangeRecordverifyDelete