public abstract class AbstractCompositeCollectionMapping extends AggregateMapping implements ContainerMapping
DatabaseMapping.WriteType| Constructor and Description |
|---|
AbstractCompositeCollectionMapping()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
buildAddedElementFromChangeSet(Object changeSet,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Build and return a new element based on the change set.
|
Object |
buildChangeSet(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.
|
Object |
buildElementFromElement(Object element,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Build and return a new element based on the specified element.
|
Object |
buildRemovedElementFromChangeSet(Object changeSet,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Build and return a new element based on the change set.
|
void |
cascadeDiscoverAndPersistUnregisteredNewObjects(Object object,
Map newObjects,
Map unregisteredExistingObjects,
Map visitedObjects,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Cascade discover and persist new objects during commit.
|
void |
cascadePerformRemoveIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade perform delete through mappings that require the cascade
|
void |
cascadeRegisterNewIfRequired(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map visitedObjects)
INTERNAL:
Cascade registerNew for Create through mappings that require the cascade
|
boolean |
compareElements(Object element1,
Object element2,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Compare the non-null elements and return true if they are alike.
|
boolean |
compareElementsForChange(Object element1,
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.ChangeRecord |
compareForChange(Object clone,
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 aggregate collection attributes.
|
boolean |
compareObjects(Object object1,
Object object2,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings.
|
org.eclipse.persistence.internal.queries.ContainerPolicy |
getContainerPolicy()
INTERNAL:
Return the mapping's containerPolicy.
|
Converter |
getConverter()
PUBLIC:
Return the converter on the mapping.
|
org.eclipse.persistence.internal.helper.DatabaseField |
getField()
INTERNAL:
Return the field mapped by this mapping.
|
Object |
getRealCollectionAttributeValueFromObject(Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Convenience method.
|
boolean |
hasConverter()
PUBLIC:
Indicates if there is a converter on the mapping.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
The mapping is initialized with the given session.
|
boolean |
isAbstractCompositeCollectionMapping()
INTERNAL:
|
boolean |
isCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
boolean |
mapKeyHasChanged(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.
|
void |
mergeChangesIntoObject(Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
void |
mergeIntoObject(Object target,
boolean isTargetUnInitialized,
Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL:
Merge changes from the source to the target object.
|
void |
postDeleteAttributeValue(DeleteObjectQuery query,
Object attributeValue)
The message is passed to its reference class descriptor.
|
void |
postInsertAttributeValue(WriteObjectQuery query,
Object attributeValue)
The message is passed to its reference class descriptor.
|
void |
postUpdateAttributeValue(WriteObjectQuery query,
Object attributeValue)
The message is passed to its reference class descriptor.
|
void |
preDeleteAttributeValue(DeleteObjectQuery query,
Object attributeValue)
The message is passed to its reference class descriptor.
|
void |
preInsertAttributeValue(WriteObjectQuery query,
Object attributeValue)
The message is passed to its reference class descriptor.
|
void |
preUpdateAttributeValue(WriteObjectQuery query,
Object attributeValue)
The message is passed to its reference class descriptor.
|
void |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
ADVANCED:
Set the mapping's containerPolicy.
|
void |
setConverter(Converter converter)
PUBLIC:
Set the converter on the mapping.
|
void |
setField(org.eclipse.persistence.internal.helper.DatabaseField field)
Set the field in the mapping.
|
void |
simpleAddToCollectionChangeRecord(Object referenceKey,
Object changeSetToAdd,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
ADVANCED:
This method is used to have an object add to a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
simpleRemoveFromCollectionChangeRecord(Object referenceKey,
Object changeSetToRemove,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
ADVANCED:
This method is used to have an object removed from a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
useCollectionClass(Class concreteContainerClass)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useCollectionClassName(String concreteContainerClassName) |
void |
useListClassName(String concreteContainerClassName) |
void |
useMapClass(Class concreteContainerClass,
String methodName)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the target objects.
|
void |
useMapClassName(String concreteContainerClassName,
String methodName) |
Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Build and return an aggregate collection from the specified row.
|
void |
writeFromObjectIntoRow(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.
|
void |
writeFromObjectIntoRowForUpdate(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.
|
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)
INTERNAL:
Get the attribute value from the object and add the appropriate
values to the specified database row.
|
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.
|
buildBackupClone, buildClone, buildCloneFromRow, buildCopy, buildExpression, fixObjectReferences, getReferenceClass, getReferenceClassName, getReferenceDescriptor, isAggregateMapping, iterate, postDelete, postInsert, postUpdate, preDelete, preInsert, preUpdate, remoteInitialization, setReferenceClass, setReferenceClassName, updateChangeRecord, verifyDeletebuildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeMerge, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, createUnitOfWorkValueHolder, derivesId, earlyPreDelete, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, instantiateAttribute, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateObjectMapping, isCandidateForPrivateOwnedRemoval, isCascadedLockingSupported, isChangeTrackingSupported, isCloningRequired, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isForeignReferenceMapping, isJoiningSupported, isJPAId, isLazy, isLockableMapping, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRelationalMapping, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postInitialize, preInitialize, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setChangeListener, setDerivedIdMapping, setDerivesId, setDescriptor, setGetMethodName, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, toString, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRowpublic AbstractCompositeCollectionMapping()
public Object buildAddedElementFromChangeSet(Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public Object buildChangeSet(Object element, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
public Object buildElementFromElement(Object element, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public Object buildRemovedElementFromChangeSet(Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public void cascadePerformRemoveIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadePerformRemoveIfRequired in class DatabaseMappingpublic void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
cascadeDiscoverAndPersistUnregisteredNewObjects in class DatabaseMappingpublic void cascadeRegisterNewIfRequired(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map visitedObjects)
cascadeRegisterNewIfRequired in class DatabaseMappingpublic boolean compareElements(Object element1, Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean compareElementsForChange(Object element1, Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(Object clone, Object backup, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareForChange in class AggregateMappingpublic void convertClassNamesToClasses(ClassLoader classLoader)
convertClassNamesToClasses in class AggregateMappingclassLoader - public boolean compareObjects(Object object1, Object object2, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects in class AggregateMappingpublic org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
getContainerPolicy in interface ContainerMappinggetContainerPolicy in class DatabaseMappingpublic Converter getConverter()
public org.eclipse.persistence.internal.helper.DatabaseField getField()
getField in class DatabaseMappingpublic Object getRealCollectionAttributeValueFromObject(Object object, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
getRealCollectionAttributeValueFromObject in class DatabaseMappingDescriptorExceptionpublic boolean hasConverter()
public boolean isAbstractCompositeCollectionMapping()
isAbstractCompositeCollectionMapping in class DatabaseMappingpublic void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
throws DescriptorException
initialize in class AggregateMappingDescriptorExceptionpublic boolean mapKeyHasChanged(Object element, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void mergeChangesIntoObject(Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
mergeChangesIntoObject in class AggregateMappingpublic void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
mergeIntoObject in class AggregateMappingpublic void postDeleteAttributeValue(DeleteObjectQuery query, Object attributeValue) throws DatabaseException, OptimisticLockException
postDeleteAttributeValue in class AggregateMappingDatabaseExceptionOptimisticLockExceptionpublic void postInsertAttributeValue(WriteObjectQuery query, Object attributeValue) throws DatabaseException, OptimisticLockException
postInsertAttributeValue in class AggregateMappingDatabaseExceptionOptimisticLockExceptionpublic void postUpdateAttributeValue(WriteObjectQuery query, Object attributeValue) throws DatabaseException, OptimisticLockException
postUpdateAttributeValue in class AggregateMappingDatabaseExceptionOptimisticLockExceptionpublic void preDeleteAttributeValue(DeleteObjectQuery query, Object attributeValue) throws DatabaseException, OptimisticLockException
preDeleteAttributeValue in class AggregateMappingDatabaseExceptionOptimisticLockExceptionpublic void preInsertAttributeValue(WriteObjectQuery query, Object attributeValue) throws DatabaseException, OptimisticLockException
preInsertAttributeValue in class AggregateMappingDatabaseExceptionOptimisticLockExceptionpublic void preUpdateAttributeValue(WriteObjectQuery query, Object attributeValue) throws DatabaseException, OptimisticLockException
preUpdateAttributeValue in class AggregateMappingDatabaseExceptionOptimisticLockExceptionpublic void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
setContainerPolicy in interface ContainerMappingpublic void setConverter(Converter converter)
public void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleAddToCollectionChangeRecord in class DatabaseMappingpublic void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleRemoveFromCollectionChangeRecord in class DatabaseMappingpublic void useCollectionClass(Class concreteContainerClass)
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.
useCollectionClass in interface ContainerMappingpublic void useCollectionClassName(String concreteContainerClassName)
public void useListClassName(String concreteContainerClassName)
public void useMapClass(Class concreteContainerClass, String methodName)
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.
useMapClass in interface ContainerMappingpublic Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession) throws DatabaseException
valueFromRow in class DatabaseMappingDatabaseExceptionpublic void writeFromObjectIntoRow(Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorException
writeFromObjectIntoRow in class DatabaseMappingDescriptorExceptionpublic void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, org.eclipse.persistence.internal.sessions.AbstractRecord row) throws DescriptorException
writeFromObjectIntoRowForUpdate in class DatabaseMappingDescriptorExceptionpublic 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 DescriptorException
writeFromObjectIntoRowWithChangeRecord in class DatabaseMappingDescriptorExceptionpublic void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record,
org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow in class DatabaseMappingpublic boolean isCollectionMapping()
DatabaseMappingisCollectionMapping in class DatabaseMapping