Class AbstractCompositeCollectionMapping
- java.lang.Object
-
- org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
-
- org.eclipse.persistence.mappings.DatabaseMapping
-
- org.eclipse.persistence.mappings.AggregateMapping
-
- org.eclipse.persistence.mappings.foundation.AbstractCompositeCollectionMapping
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,ContainerMapping,ArrayCollectionMapping
- Direct Known Subclasses:
EISCompositeCollectionMapping,ObjectArrayMapping,XMLCompositeCollectionMapping
public abstract class AbstractCompositeCollectionMapping extends AggregateMapping implements ContainerMapping, ArrayCollectionMapping
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.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Field Summary
Fields Modifier and Type Field Description protected ConverterconverterAllows user defined conversion between the object attribute value and the database value.protected org.eclipse.persistence.internal.helper.DatabaseFieldfieldThe aggregate objects are stored in a single field.-
Fields inherited from class org.eclipse.persistence.mappings.AggregateMapping
hasNestedIdentityReference, referenceClass, referenceClassName, referenceDescriptor
-
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
-
-
Constructor Summary
Constructors Constructor Description AbstractCompositeCollectionMapping()Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectbuildAddedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Build and return a new element based on the change set.protected java.lang.ObjectbuildBackupClonePart(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)Build and return a backup clone of the attribute.java.lang.ObjectbuildChangeSet(java.lang.Object element, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Build and return a change set for the specified element.protected java.lang.ObjectbuildClonePart(java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object attributeValue, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession clonningSession)Build and return a clone of the attribute.protected abstract java.lang.ObjectbuildCompositeObject(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)protected abstract org.eclipse.persistence.internal.sessions.AbstractRecordbuildCompositeRow(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord record, DatabaseMapping.WriteType writeType)protected java.lang.ObjectbuildCopyOfAttributeValue(java.lang.Object attributeValue, CopyGroup group)Copy of the attribute of the object.protected java.lang.ObjectbuildElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)Build and return a new element based on the change set.java.lang.ObjectbuildElementFromElement(java.lang.Object element, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Build and return a new element based on the specified element.ExpressionbuildExpression(java.lang.Object queryObject, QueryByExamplePolicy policy, Expression expressionBuilder, java.util.Map processedObjects, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: In case Query By Example is used, this method builds and returns an expression that corresponds to a single attribute and it's value.java.lang.ObjectbuildRemovedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Build and return a new element based on the change set.voidcascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object, java.util.Map newObjects, java.util.Map unregisteredExistingObjects, java.util.Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Set cascadeErrors)INTERNAL: Cascade discover and persist new objects during commit.voidcascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade perform delete through mappings that require the cascadevoidcascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade registerNew for Create through mappings that require the cascadeprotected java.util.VectorcollectFields()Return the fields handled by the mapping.booleancompareElements(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the non-null elements and return true if they are alike.booleancompareElementsForChange(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the non-null elements and return true if they are alike.org.eclipse.persistence.internal.sessions.ChangeRecordcompareForChange(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Build and return the change record that results from comparing the two direct collection attributes.booleancompareObjects(java.lang.Object object1, java.lang.Object object2, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the attributes belonging to this mapping for the objects.voidconvertClassNamesToClasses(java.lang.ClassLoader classLoader)INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.protected org.eclipse.persistence.internal.sessions.ChangeRecordconvertToChangeRecord(java.lang.Object cloneCollection, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)java.lang.ObjectcreateMapComponentFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isTargetProtected)INTERNAL Called when a DatabaseMapping is used to map the key in a collection.protected voidfixAttributeValue(java.lang.Object attributeValue, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)An object has been serialized from the server to the remote client.protected java.lang.ObjectgetAttributeValueFromBackupClone(java.lang.Object backupClone)Return the appropriate attribute value.org.eclipse.persistence.internal.queries.ContainerPolicygetContainerPolicy()INTERNAL: Return the mapping's containerPolicy.ConvertergetConverter()PUBLIC: Return the converter on the mapping.org.eclipse.persistence.internal.helper.DatabaseFieldgetField()INTERNAL: Return the field mapped by this mapping.java.lang.ObjectgetRealCollectionAttributeValueFromObject(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Convenience method.protected java.lang.StringgetStructureName()This is required for ObjectArrayMapping which defines a name for the collection type.booleanhasConverter()PUBLIC: Indicates if there is a converter on the mapping.voidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: The mapping is initialized with the given session.booleanisAbstractCompositeCollectionMapping()INTERNAL:booleanisCollectionMapping()INTERNAL: Related mapping should implement this method to return true.protected voiditerateOnAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator descriptorIterator, java.lang.Object attributeValue)Iterate on the specified attribute value.booleanmapKeyHasChanged(java.lang.Object element, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Return whether the element's user-defined Map key has changed since it was cloned from the original version.voidmergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Merge changes from the source to the target object.voidmergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Merge changes from the source to the target object.voidpostDeleteAttributeValue(DeleteObjectQuery query, java.lang.Object attributeValue)The message is passed to its reference class descriptor.voidpostInsertAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)The message is passed to its reference class descriptor.voidpostUpdateAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)The message is passed to its reference class descriptor.voidpreDeleteAttributeValue(DeleteObjectQuery query, java.lang.Object attributeValue)The message is passed to its reference class descriptor.voidpreInsertAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)The message is passed to its reference class descriptor.voidpreUpdateAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)The message is passed to its reference class descriptor.voidsetContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)ADVANCED: Set the mapping's containerPolicy.voidsetConverter(Converter converter)PUBLIC: Set the converter on the mapping.voidsetField(org.eclipse.persistence.internal.helper.DatabaseField field)Set the field in the mapping.voidsimpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)ADVANCED: This method is used to have an object add to a collection once the changeSet is applied The referenceKey parameter should only be used for direct Maps.voidsimpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToRemove, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)ADVANCED: This method is used to have an object removed from a collection once the changeSet is applied The referenceKey parameter should only be used for direct Maps.voiduseCollectionClass(java.lang.Class concreteContainerClass)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.voiduseCollectionClassName(java.lang.String concreteContainerClassName)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.voiduseListClassName(java.lang.String concreteContainerClassName)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.voiduseMapClass(java.lang.Class concreteContainerClass, java.lang.String methodName)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.voiduseMapClassName(java.lang.String concreteContainerClassName, java.lang.String methodName)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.java.lang.ObjectvalueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed)INTERNAL: Build and return an aggregate collection from the specified row.protected booleanverifyDeleteOfAttributeValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session)Return whether the specified object and all its components have been deleted.voidwriteFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.voidwriteFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, org.eclipse.persistence.internal.sessions.AbstractRecord row)INTERNAL: Get the attribute value from the object and add the changed values to the specified database row.voidwriteFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.voidwriteInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Write fields needed for insert into the template with null values.-
Methods inherited from class org.eclipse.persistence.mappings.AggregateMapping
buildAggregateDeleteQuery, buildAggregateModifyQuery, buildAggregateWriteQuery, buildBackupClone, buildClone, buildCloneFromRow, buildClonePart, buildCopy, buildNewMergeInstanceOf, compareAttributeValues, executeEvent, fixObjectReferences, getObjectBuilder, getObjectBuilderForClass, getQueryManager, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getReferenceDescriptor, getReferenceDescriptor, hasNestedIdentityReference, isAggregateMapping, iterate, load, loadAll, mergeAttributeValue, postDelete, postInsert, postUpdate, preDelete, preInsert, preUpdate, remoteInitialization, setReferenceClass, setReferenceClassName, setReferenceDescriptor, updateChangeRecord, verifyDelete
-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateObjectMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postInitialize, postInitializeSourceAndTargetExpressions, preInitialize, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, toString, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRow
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.mappings.structures.ArrayCollectionMapping
getAttributeName, setRealAttributeValueInObject
-
-
-
-
Field Detail
-
field
protected org.eclipse.persistence.internal.helper.DatabaseField field
The aggregate objects are stored in a single field.
-
converter
protected Converter converter
Allows user defined conversion between the object attribute value and the database value.
-
-
Method Detail
-
buildAddedElementFromChangeSet
public java.lang.Object buildAddedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Build and return a new element based on the change set.- Specified by:
buildAddedElementFromChangeSetin interfaceArrayCollectionMapping
-
buildBackupClonePart
protected java.lang.Object buildBackupClonePart(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)Build and return a backup clone of the attribute.- Overrides:
buildBackupClonePartin classAggregateMapping
-
buildChangeSet
public java.lang.Object buildChangeSet(java.lang.Object element, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Build and return a change set for the specified element.- Specified by:
buildChangeSetin interfaceArrayCollectionMapping
-
buildClonePart
protected java.lang.Object buildClonePart(java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object attributeValue, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession clonningSession)Build and return a clone of the attribute.- Overrides:
buildClonePartin classAggregateMapping
-
buildCopyOfAttributeValue
protected java.lang.Object buildCopyOfAttributeValue(java.lang.Object attributeValue, CopyGroup group)Copy of the attribute of the object. This is NOT used for unit of work but for templatizing an object.- Overrides:
buildCopyOfAttributeValuein classAggregateMapping
-
buildElementFromChangeSet
protected java.lang.Object buildElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)Build and return a new element based on the change set.
-
buildElementFromElement
public java.lang.Object buildElementFromElement(java.lang.Object element, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Build and return a new element based on the specified element.- Specified by:
buildElementFromElementin interfaceArrayCollectionMapping
-
buildExpression
public Expression buildExpression(java.lang.Object queryObject, QueryByExamplePolicy policy, Expression expressionBuilder, java.util.Map processedObjects, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: In case Query By Example is used, this method builds and returns an expression that corresponds to a single attribute and it's value.- Overrides:
buildExpressionin classAggregateMapping
-
buildRemovedElementFromChangeSet
public java.lang.Object buildRemovedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Build and return a new element based on the change set.- Specified by:
buildRemovedElementFromChangeSetin interfaceArrayCollectionMapping
-
cascadePerformRemoveIfRequired
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade perform delete through mappings that require the cascade- Specified by:
cascadePerformRemoveIfRequiredin classDatabaseMapping
-
cascadeDiscoverAndPersistUnregisteredNewObjects
public void cascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object, java.util.Map newObjects, java.util.Map unregisteredExistingObjects, java.util.Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Set cascadeErrors)INTERNAL: Cascade discover and persist new objects during commit.- Overrides:
cascadeDiscoverAndPersistUnregisteredNewObjectsin classDatabaseMapping
-
cascadeRegisterNewIfRequired
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade registerNew for Create through mappings that require the cascade- Specified by:
cascadeRegisterNewIfRequiredin classDatabaseMapping
-
collectFields
protected java.util.Vector collectFields()
Return the fields handled by the mapping.- Overrides:
collectFieldsin classDatabaseMapping
-
compareElements
public boolean compareElements(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the non-null elements and return true if they are alike.- Specified by:
compareElementsin interfaceArrayCollectionMapping
-
compareElementsForChange
public boolean compareElementsForChange(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the non-null elements and return true if they are alike.- Specified by:
compareElementsForChangein interfaceArrayCollectionMapping
-
convertClassNamesToClasses
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Overrides:
convertClassNamesToClassesin classAggregateMapping- Parameters:
classLoader-
-
convertToChangeRecord
protected org.eclipse.persistence.internal.sessions.ChangeRecord convertToChangeRecord(java.lang.Object cloneCollection, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
-
fixAttributeValue
protected void fixAttributeValue(java.lang.Object attributeValue, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)An object has been serialized from the server to the remote client. Replace the transient attributes of the remote value holders with client-side objects.- Overrides:
fixAttributeValuein classAggregateMapping
-
getAttributeValueFromBackupClone
protected java.lang.Object getAttributeValueFromBackupClone(java.lang.Object backupClone)
Return the appropriate attribute value. This method is a hack to allow the aggregate collection subclass to override.... The intent is to return the aggregate object in the backup clone that corresponds to the one in the working copy. Since we don't know which element in the backup clone collection corresponds any given element in the working copy collection (there is no "primary key"); we simply return null, which will cause a new, empty, instance to be built and used for comparison.- Overrides:
getAttributeValueFromBackupClonein classAggregateMapping
-
getContainerPolicy
public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
INTERNAL: Return the mapping's containerPolicy.- Specified by:
getContainerPolicyin interfaceContainerMapping- Overrides:
getContainerPolicyin classDatabaseMapping
-
getConverter
public Converter getConverter()
PUBLIC: Return the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute.
-
getField
public org.eclipse.persistence.internal.helper.DatabaseField getField()
INTERNAL: Return the field mapped by this mapping.- Overrides:
getFieldin classDatabaseMapping
-
getRealCollectionAttributeValueFromObject
public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: Convenience method. Return the value of an attribute, unwrapping value holders if necessary. If the value is null, build a new container.- Specified by:
getRealCollectionAttributeValueFromObjectin interfaceArrayCollectionMapping- Overrides:
getRealCollectionAttributeValueFromObjectin classDatabaseMapping- Throws:
DescriptorException
-
getStructureName
protected java.lang.String getStructureName()
This is required for ObjectArrayMapping which defines a name for the collection type. Currently this type name is not required or used in general with the SDK.
-
hasConverter
public boolean hasConverter()
PUBLIC: Indicates if there is a converter on the mapping.
-
isAbstractCompositeCollectionMapping
public boolean isAbstractCompositeCollectionMapping()
INTERNAL:- Overrides:
isAbstractCompositeCollectionMappingin classDatabaseMapping
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: The mapping is initialized with the given session. This mapping is fully initialized after this.- Overrides:
initializein classAggregateMapping- Throws:
DescriptorException
-
iterateOnAttributeValue
protected void iterateOnAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator descriptorIterator, java.lang.Object attributeValue)Iterate on the specified attribute value.- Overrides:
iterateOnAttributeValuein classAggregateMapping
-
mapKeyHasChanged
public boolean mapKeyHasChanged(java.lang.Object element, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Return whether the element's user-defined Map key has changed since it was cloned from the original version. Aggregate elements cannot change their keys without detection.- Specified by:
mapKeyHasChangedin interfaceArrayCollectionMapping
-
postDeleteAttributeValue
public void postDeleteAttributeValue(DeleteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
The message is passed to its reference class descriptor.- Overrides:
postDeleteAttributeValuein classAggregateMapping- Throws:
DatabaseExceptionOptimisticLockException
-
postInsertAttributeValue
public void postInsertAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
The message is passed to its reference class descriptor.- Overrides:
postInsertAttributeValuein classAggregateMapping- Throws:
DatabaseExceptionOptimisticLockException
-
postUpdateAttributeValue
public void postUpdateAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
The message is passed to its reference class descriptor.- Overrides:
postUpdateAttributeValuein classAggregateMapping- Throws:
DatabaseExceptionOptimisticLockException
-
preDeleteAttributeValue
public void preDeleteAttributeValue(DeleteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
The message is passed to its reference class descriptor.- Overrides:
preDeleteAttributeValuein classAggregateMapping- Throws:
DatabaseExceptionOptimisticLockException
-
preInsertAttributeValue
public void preInsertAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
The message is passed to its reference class descriptor.- Overrides:
preInsertAttributeValuein classAggregateMapping- Throws:
DatabaseExceptionOptimisticLockException
-
preUpdateAttributeValue
public void preUpdateAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
The message is passed to its reference class descriptor.- Overrides:
preUpdateAttributeValuein classAggregateMapping- Throws:
DatabaseExceptionOptimisticLockException
-
setContainerPolicy
public void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
ADVANCED: Set the mapping's containerPolicy.- Specified by:
setContainerPolicyin interfaceContainerMapping
-
setConverter
public void setConverter(Converter converter)
PUBLIC: Set the converter on the mapping. A converter can be used to convert between the object's value and database value of the attribute.
-
setField
public void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
Set the field in the mapping.
-
useCollectionClass
public void useCollectionClass(java.lang.Class concreteContainerClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.jdk1.2.x: The container class must implement (directly or indirectly) the Collection interface.
jdk1.1.x: The container class must be a subclass of Vector.
- Specified by:
useCollectionClassin interfaceContainerMapping
-
useCollectionClassName
public void useCollectionClassName(java.lang.String concreteContainerClassName)
Description copied from interface:ContainerMappingPUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.The container class must implement (directly or indirectly) the
java.util.Collectioninterface.- Specified by:
useCollectionClassNamein interfaceContainerMapping
-
useListClassName
public void useListClassName(java.lang.String concreteContainerClassName)
Description copied from interface:ContainerMappingPUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects.The container class must implement (directly or indirectly) the
java.util.Listinterface.- Specified by:
useListClassNamein interfaceContainerMapping
-
useMapClass
public void useMapClass(java.lang.Class concreteContainerClass, java.lang.String methodName)PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. The key used to index the value in the 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 the value to be inserted into the Map.jdk1.2.x: The container class must implement (directly or indirectly) the Map interface.
jdk1.1.x: The container class must be a subclass of Hashtable.
The referenceClass must be set before calling this method.
- Specified by:
useMapClassin interfaceContainerMapping
-
useMapClassName
public void useMapClassName(java.lang.String concreteContainerClassName, java.lang.String methodName)Description copied from interface:ContainerMappingPUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. The key used to index a value in theMapis 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 theMap.The container class must implement (directly or indirectly) the
java.util.Mapinterface.To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
- Specified by:
useMapClassNamein interfaceContainerMapping
-
valueFromRow
public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed) throws DatabaseExceptionINTERNAL: Build and return an aggregate collection from the specified row.- Overrides:
valueFromRowin classDatabaseMapping- Throws:
DatabaseException
-
buildCompositeObject
protected abstract java.lang.Object buildCompositeObject(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
-
verifyDeleteOfAttributeValue
protected boolean verifyDeleteOfAttributeValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseExceptionReturn whether the specified object and all its components have been deleted.- Overrides:
verifyDeleteOfAttributeValuein classAggregateMapping- Throws:
DatabaseException
-
writeFromObjectIntoRow
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorExceptionINTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.- Overrides:
writeFromObjectIntoRowin classDatabaseMapping- Throws:
DescriptorException
-
buildCompositeRow
protected abstract org.eclipse.persistence.internal.sessions.AbstractRecord buildCompositeRow(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord record, DatabaseMapping.WriteType writeType)
-
writeFromObjectIntoRowForUpdate
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, org.eclipse.persistence.internal.sessions.AbstractRecord row) throws DescriptorException
INTERNAL: Get the attribute value from the object and add the changed values to the specified database row.- Overrides:
writeFromObjectIntoRowForUpdatein classDatabaseMapping- Throws:
DescriptorException
-
writeFromObjectIntoRowWithChangeRecord
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorExceptionINTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.- Overrides:
writeFromObjectIntoRowWithChangeRecordin classDatabaseMapping- Throws:
DescriptorException
-
writeInsertFieldsIntoRow
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Write fields needed for insert into the template with null values.- Overrides:
writeInsertFieldsIntoRowin classDatabaseMapping
-
isCollectionMapping
public boolean isCollectionMapping()
Description copied from class:DatabaseMappingINTERNAL: Related mapping should implement this method to return true.- Overrides:
isCollectionMappingin classDatabaseMapping
-
compareForChange
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Build and return the change record that results from comparing the two direct collection attributes.- Overrides:
compareForChangein classAggregateMapping- Returns:
- prototype.changeset.ChangeRecord
-
compareObjects
public boolean compareObjects(java.lang.Object object1, java.lang.Object object2, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Compare the attributes belonging to this mapping for the objects.- Overrides:
compareObjectsin classAggregateMapping
-
mergeChangesIntoObject
public void mergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Merge changes from the source to the target object.- Overrides:
mergeChangesIntoObjectin classAggregateMapping
-
mergeIntoObject
public void mergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: Merge changes from the source to the target object. Simply replace the entire target collection.- Overrides:
mergeIntoObjectin classAggregateMapping
-
simpleAddToCollectionChangeRecord
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)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.- Overrides:
simpleAddToCollectionChangeRecordin classDatabaseMapping
-
simpleRemoveFromCollectionChangeRecord
public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object changeSetToRemove, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)ADVANCED: This method is used to have an object removed from a collection once the changeSet is applied The referenceKey parameter should only be used for direct Maps.- Overrides:
simpleRemoveFromCollectionChangeRecordin classDatabaseMapping
-
createMapComponentFromRow
public java.lang.Object createMapComponentFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isTargetProtected)INTERNAL Called when a DatabaseMapping is used to map the key in a collection. Returns the key.
-
-