|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.mappings.DatabaseMapping org.eclipse.persistence.mappings.AggregateMapping org.eclipse.persistence.mappings.foundation.AbstractCompositeCollectionMapping
public abstract class AbstractCompositeCollectionMapping
Field Summary | |
---|---|
protected Converter |
converter
Allows user defined conversion between the object attribute value and the database value. |
protected org.eclipse.persistence.internal.helper.DatabaseField |
field
The aggregate objects are stored in a single field. |
Fields inherited from class org.eclipse.persistence.mappings.AggregateMapping |
---|
referenceClass, referenceClassName, referenceDescriptor |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, descriptor, fields, isLazy, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_1 |
Constructor Summary | |
---|---|
AbstractCompositeCollectionMapping()
Default constructor. |
Method Summary | |
---|---|
java.lang.Object |
buildAddedElementFromChangeSet(java.lang.Object changeSet,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Build and return a new element based on the change set. |
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. |
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. |
protected java.lang.Object |
buildClonePart(java.lang.Object original,
java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
Build and return a clone of the attribute. |
protected abstract java.lang.Object |
buildCompositeObject(ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger)
|
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)
|
protected java.lang.Object |
buildCopyOfAttributeValue(java.lang.Object attributeValue,
ObjectCopyingPolicy policy)
Copy of the attribute of the object. |
protected java.lang.Object |
buildElementFromChangeSet(java.lang.Object changeSet,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
Build and return a new element based on the change set. |
java.lang.Object |
buildElementFromElement(java.lang.Object element,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Build and return a new element based on the specified element. |
java.lang.Object |
buildRemovedElementFromChangeSet(java.lang.Object changeSet,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Build and return a new element based on the change set. |
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)
INTERNAL: Cascade discover and persist new objects during commit. |
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 |
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 |
protected java.util.Vector |
collectFields()
Return the fields handled by the mapping. |
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. |
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. |
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 aggregate collection attributes. |
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. |
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 implemented by subclasses as necessary. |
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)
|
protected void |
fixAttributeValue(java.lang.Object attributeValue,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
RemoteSession session)
An object has been serialized from the server to the remote client. |
protected java.lang.Object |
getAttributeValueFromBackupClone(java.lang.Object backupClone)
Return the appropriate attribute value. |
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. |
java.lang.Object |
getRealCollectionAttributeValueFromObject(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Convenience method. |
protected java.lang.String |
getStructureName()
This is required for ObjectArrayMapping which defines a name for the collection type. |
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: |
protected void |
iterateOnAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator descriptorIterator,
java.lang.Object attributeValue)
Iterate on the specified attribute value. |
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. |
void |
mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Merge changes from the source to the target object. |
void |
mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: Merge changes from the source to the target object. |
protected void |
postDeleteAttributeValue(DeleteObjectQuery query,
java.lang.Object attributeValue)
The message is passed to its reference class descriptor. |
protected void |
postInsertAttributeValue(WriteObjectQuery query,
java.lang.Object attributeValue)
The message is passed to its reference class descriptor. |
protected void |
postUpdateAttributeValue(WriteObjectQuery query,
java.lang.Object attributeValue)
The message is passed to its reference class descriptor. |
protected void |
preDeleteAttributeValue(DeleteObjectQuery query,
java.lang.Object attributeValue)
The message is passed to its reference class descriptor. |
protected void |
preInsertAttributeValue(WriteObjectQuery query,
java.lang.Object attributeValue)
The message is passed to its reference class descriptor. |
protected void |
preUpdateAttributeValue(WriteObjectQuery query,
java.lang.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(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. |
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. |
void |
useCollectionClass(java.lang.Class concreteContainerClass)
PUBLIC: Configure the mapping to use an instance of the specified container class to hold the target objects. |
void |
useCollectionClassName(java.lang.String concreteContainerClassName)
|
void |
useListClassName(java.lang.String concreteContainerClassName)
|
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. |
void |
useMapClassName(java.lang.String concreteContainerClassName,
java.lang.String methodName)
|
java.lang.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. |
protected boolean |
verifyDeleteOfAttributeValue(java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Return whether the specified object and all its components have been deleted. |
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
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)
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. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.persistence.internal.helper.DatabaseField field
protected Converter converter
Constructor Detail |
---|
public AbstractCompositeCollectionMapping()
Method Detail |
---|
public java.lang.Object buildAddedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
protected java.lang.Object buildBackupClonePart(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupClonePart
in class AggregateMapping
public java.lang.Object buildChangeSet(java.lang.Object element, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
protected java.lang.Object buildClonePart(java.lang.Object original, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildClonePart
in class AggregateMapping
protected java.lang.Object buildCopyOfAttributeValue(java.lang.Object attributeValue, ObjectCopyingPolicy policy)
buildCopyOfAttributeValue
in class AggregateMapping
protected java.lang.Object buildElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public java.lang.Object buildElementFromElement(java.lang.Object element, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public java.lang.Object buildRemovedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemoveIfRequired
in class DatabaseMapping
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)
cascadeDiscoverAndPersistUnregisteredNewObjects
in class DatabaseMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadeRegisterNewIfRequired
in class DatabaseMapping
protected java.util.Vector collectFields()
collectFields
in class DatabaseMapping
public boolean compareElements(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean compareElementsForChange(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)
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)
compareForChange
in class AggregateMapping
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses
in class AggregateMapping
classLoader
- 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)
public boolean compareObjects(java.lang.Object object1, java.lang.Object object2, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects
in class AggregateMapping
protected void fixAttributeValue(java.lang.Object attributeValue, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, RemoteSession session)
fixAttributeValue
in class AggregateMapping
protected java.lang.Object getAttributeValueFromBackupClone(java.lang.Object backupClone)
getAttributeValueFromBackupClone
in class AggregateMapping
public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
getContainerPolicy
in interface ContainerMapping
getContainerPolicy
in class DatabaseMapping
public Converter getConverter()
public org.eclipse.persistence.internal.helper.DatabaseField getField()
getField
in class DatabaseMapping
public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
getRealCollectionAttributeValueFromObject
in class DatabaseMapping
DescriptorException
protected java.lang.String getStructureName()
public boolean hasConverter()
public boolean isAbstractCompositeCollectionMapping()
isAbstractCompositeCollectionMapping
in class DatabaseMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class AggregateMapping
DescriptorException
protected void iterateOnAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator descriptorIterator, java.lang.Object attributeValue)
iterateOnAttributeValue
in class AggregateMapping
public boolean mapKeyHasChanged(java.lang.Object element, org.eclipse.persistence.internal.sessions.AbstractSession session)
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)
mergeChangesIntoObject
in class AggregateMapping
public void mergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
mergeIntoObject
in class AggregateMapping
protected void postDeleteAttributeValue(DeleteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
postDeleteAttributeValue
in class AggregateMapping
DatabaseException
OptimisticLockException
protected void postInsertAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
postInsertAttributeValue
in class AggregateMapping
DatabaseException
OptimisticLockException
protected void postUpdateAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
postUpdateAttributeValue
in class AggregateMapping
DatabaseException
OptimisticLockException
protected void preDeleteAttributeValue(DeleteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
preDeleteAttributeValue
in class AggregateMapping
DatabaseException
OptimisticLockException
protected void preInsertAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
preInsertAttributeValue
in class AggregateMapping
DatabaseException
OptimisticLockException
protected void preUpdateAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue) throws DatabaseException, OptimisticLockException
preUpdateAttributeValue
in class AggregateMapping
DatabaseException
OptimisticLockException
public void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
setContainerPolicy
in interface ContainerMapping
public void setConverter(Converter converter)
public void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
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)
simpleAddToCollectionChangeRecord
in class DatabaseMapping
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)
simpleRemoveFromCollectionChangeRecord
in class DatabaseMapping
public void useCollectionClass(java.lang.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 ContainerMapping
public void useCollectionClassName(java.lang.String concreteContainerClassName)
public void useListClassName(java.lang.String concreteContainerClassName)
public void useMapClass(java.lang.Class concreteContainerClass, java.lang.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 ContainerMapping
public void useMapClassName(java.lang.String concreteContainerClassName, java.lang.String methodName)
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.sessions.AbstractSession executionSession) throws DatabaseException
valueFromRow
in class DatabaseMapping
DatabaseException
protected abstract java.lang.Object buildCompositeObject(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractRecord nestedRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger)
protected boolean verifyDeleteOfAttributeValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
verifyDeleteOfAttributeValue
in class AggregateMapping
DatabaseException
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
writeFromObjectIntoRow
in class DatabaseMapping
DescriptorException
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)
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, org.eclipse.persistence.internal.sessions.AbstractRecord row) throws DescriptorException
writeFromObjectIntoRowForUpdate
in class DatabaseMapping
DescriptorException
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
writeFromObjectIntoRowWithChangeRecord
in class DatabaseMapping
DescriptorException
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow
in class DatabaseMapping
|
EclipseLink 1.1.4, build 'v20100812-r7860' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |