public abstract class AbstractCompositeDirectCollectionMapping extends DatabaseMapping implements ContainerMapping, ArrayCollectionMapping
AbstractCompositeDirectCollectionMapping
consolidates the behavior of mappings that
map collections of "native" data objects (e.g. String
s).
These are objects that do not have their own descriptor and repeat within the XML record
for the containing object.DatabaseMapping.WriteType
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
elementDataTypeName
This is the "data type" associated with each element in the nested collection.
|
protected org.eclipse.persistence.internal.helper.DatabaseField |
field
This is the field holding the nested collection.
|
protected Converter |
valueConverter
Allows user defined conversion between the object value and the database value.
|
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 and Description |
---|
AbstractCompositeDirectCollectionMapping()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
buildBackupClone(java.lang.Object clone,
java.lang.Object backup,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL:
Clone the attribute from the clone and assign it to the backup.
|
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.
|
void |
buildClone(java.lang.Object original,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object clone,
java.lang.Integer refreshCascade,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
INTERNAL:
Clone the attribute from the original and assign it to the clone.
|
void |
buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL:
Extract value from the row and set the attribute to this value in the
working copy clone.
|
protected java.lang.Object |
buildClonePart(java.lang.Object attributeValue,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
Build and return a clone of the specified attribute value.
|
void |
buildCopy(java.lang.Object copy,
java.lang.Object original,
CopyGroup group)
INTERNAL:
Copy of the attribute of the object.
|
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.
|
java.lang.Object |
buildElementFromElement(java.lang.Object object,
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.
|
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.
|
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.
|
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 direct 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) |
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.
|
void |
fixObjectReferences(java.lang.Object object,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
INTERNAL:
An object has been serialized from the server to the client.
|
java.lang.Class |
getAttributeElementClass()
PUBLIC:
Return the class each element in the object's
collection should be converted to, before the collection
is inserted into the object.
|
org.eclipse.persistence.internal.queries.ContainerPolicy |
getContainerPolicy()
INTERNAL:
Return the mapping's containerPolicy.
|
org.eclipse.persistence.internal.helper.DatabaseField |
getField()
INTERNAL:
Return the field that holds the nested collection.
|
java.lang.Class |
getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
INTERNAL:
Return the classifiction for the field contained in the mapping.
|
java.lang.Class |
getFieldElementClass()
PUBLIC:
Return the class each element in the database row's
collection should be converted to, before the collection
is inserted into the database.
|
java.lang.String |
getFieldName()
PUBLIC:
Return the name of the field that holds the nested collection.
|
java.lang.Object |
getRealCollectionAttributeValueFromObject(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Convenience method.
|
Converter |
getValueConverter()
PUBLIC:
Return the converter on the mapping.
|
boolean |
hasValueConverter()
PUBLIC:
Indicates if there is a converter on the mapping.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the mapping.
|
boolean |
isAbstractCompositeDirectCollectionMapping()
INTERNAL:
|
boolean |
isCollectionMapping()
INTERNAL:
Related mapping should implement this method to return true.
|
void |
iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
INTERNAL:
Iterate on the appropriate 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,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
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,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL:
Merge changes from the source to the target object.
|
void |
setAttributeElementClass(java.lang.Class attributeElementClass)
PUBLIC:
Set the class each element in the object's
collection should be converted to, before the collection
is inserted into the object.
|
void |
setAttributeElementClassName(java.lang.String attributeElementClass)
PUBLIC:
Set the class each element in the object's
collection should be converted to, before the collection
is inserted into the object.
|
void |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
ADVANCED:
Set the mapping's containerPolicy.
|
void |
setField(org.eclipse.persistence.internal.helper.DatabaseField field)
Set the field that holds the nested collection.
|
void |
setFieldElementClass(java.lang.Class fieldElementClass)
PUBLIC:
Set the class each element in the database row's
collection should be converted to, before the collection
is inserted into the database.
|
void |
setUsesSingleNode(boolean usesSingleNode)
PUBLIC:
Sets whether the mapping uses a single node.
|
void |
setValueConverter(Converter valueConverter)
PUBLIC:
Set the converter on 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 concreteClass)
PUBLIC:
Configure the mapping to use an instance of the specified container class
to hold the nested objects.
|
void |
useCollectionClassName(java.lang.String concreteClassName)
INTERNAL:
Used to set the collection class by name.
|
void |
useListClassName(java.lang.String concreteClassName)
INTERNAL:
Used to set the collection class by name.
|
void |
useMapClass(java.lang.Class concreteClass,
java.lang.String methodName)
PUBLIC:
Mapping does not support Map containers.
|
void |
useMapClassName(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.
|
boolean |
usesSingleNode()
PUBLIC:
Checks whether the mapping uses a single node.
|
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)
INTERNAL:
Build the nested collection from the database row.
|
void |
writeFromObjectIntoRow(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
store it in the appropriate field of the row.
|
void |
writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery,
org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:
If any part of the nested collection has changed, the whole thing is written.
|
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 appropriate attribute value from the object
and put it in the appropriate field of the database row.
|
void |
writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Write the fields needed for insert into the template with null values.
|
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildExpression, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, clone, cloneFields, collectQueryParameters, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, earlyPreDelete, extractNestedExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeClassification, getAttributeName, getAttributeValueFromObject, getDerivedIdMapping, getDescriptor, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getOrderByNormalizedExpressions, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getReferenceDescriptor, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasDependency, hasInverseConstraintDependency, hasMapsIdValue, hasNestedIdentityReference, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, 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, load, loadAll, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postDelete, postInitialize, postInsert, postUpdate, preDelete, preInitialize, preInsert, prepareCascadeLockingPolicy, preUpdate, readFromResultSetIntoObject, readFromRowIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, rehashFieldDependancies, remoteInitialization, 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, updateChangeRecord, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromObject, valueFromResultSet, valueFromRow, verifyDelete, writeFromAttributeIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeUpdateFieldsIntoRow
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributeName, setRealAttributeValueInObject
protected org.eclipse.persistence.internal.helper.DatabaseField field
protected java.lang.String elementDataTypeName
protected Converter valueConverter
public AbstractCompositeDirectCollectionMapping()
public Converter getValueConverter()
public boolean hasValueConverter()
public void setValueConverter(Converter valueConverter)
public java.lang.Object buildAddedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
buildAddedElementFromChangeSet
in interface ArrayCollectionMapping
public void buildBackupClone(java.lang.Object clone, java.lang.Object backup, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildBackupClone
in class DatabaseMapping
public java.lang.Object buildChangeSet(java.lang.Object element, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildChangeSet
in interface ArrayCollectionMapping
public void buildClone(java.lang.Object original, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object clone, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
buildClone
in class DatabaseMapping
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object clone, org.eclipse.persistence.internal.identitymaps.CacheKey sharedCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
buildCloneFromRow
in class DatabaseMapping
protected java.lang.Object buildClonePart(java.lang.Object attributeValue, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession)
public void buildCopy(java.lang.Object copy, java.lang.Object original, CopyGroup group)
buildCopy
in class DatabaseMapping
protected java.lang.Object buildElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
public java.lang.Object buildElementFromElement(java.lang.Object object, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
buildElementFromElement
in interface ArrayCollectionMapping
public java.lang.Object buildRemovedElementFromChangeSet(java.lang.Object changeSet, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
buildRemovedElementFromChangeSet
in interface ArrayCollectionMapping
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemoveIfRequired
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)
compareElements
in interface ArrayCollectionMapping
public boolean compareElementsForChange(java.lang.Object element1, java.lang.Object element2, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareElementsForChange
in interface ArrayCollectionMapping
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 void fixObjectReferences(java.lang.Object object, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
fixObjectReferences
in class DatabaseMapping
public java.lang.Class getAttributeElementClass()
public org.eclipse.persistence.internal.queries.ContainerPolicy getContainerPolicy()
getContainerPolicy
in interface ContainerMapping
getContainerPolicy
in class DatabaseMapping
public org.eclipse.persistence.internal.helper.DatabaseField getField()
getField
in class DatabaseMapping
public boolean isAbstractCompositeDirectCollectionMapping()
isAbstractCompositeDirectCollectionMapping
in class DatabaseMapping
public java.lang.Class getFieldElementClass()
public java.lang.String getFieldName()
public java.lang.Object getRealCollectionAttributeValueFromObject(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
getRealCollectionAttributeValueFromObject
in interface ArrayCollectionMapping
getRealCollectionAttributeValueFromObject
in class DatabaseMapping
DescriptorException
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class DatabaseMapping
DescriptorException
public void iterate(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator)
iterate
in class DatabaseMapping
public boolean mapKeyHasChanged(java.lang.Object element, org.eclipse.persistence.internal.sessions.AbstractSession session)
mapKeyHasChanged
in interface ArrayCollectionMapping
public void setAttributeElementClass(java.lang.Class attributeElementClass)
public void setAttributeElementClassName(java.lang.String attributeElementClass)
public void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
setContainerPolicy
in interface ContainerMapping
public void setField(org.eclipse.persistence.internal.helper.DatabaseField field)
public void setFieldElementClass(java.lang.Class fieldElementClass)
public void useCollectionClass(java.lang.Class concreteClass)
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 concreteClassName)
useCollectionClassName
in interface ContainerMapping
public void useListClassName(java.lang.String concreteClassName)
useListClassName
in interface ContainerMapping
public void useMapClass(java.lang.Class concreteClass, java.lang.String methodName)
useMapClass
in interface ContainerMapping
public void useMapClassName(java.lang.String concreteContainerClassName, java.lang.String methodName)
ContainerMapping
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 any
value to be inserted into the Map
.
The container class must implement (directly or indirectly) the
java.util.Map
interface.
To facilitate resolving the method, the mapping's referenceClass must set before calling this method.
useMapClassName
in interface ContainerMapping
public void setUsesSingleNode(boolean usesSingleNode)
True
- if the items in the collection are in a single node or false if each of the items in the collection is in its own nodepublic boolean usesSingleNode()
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 DatabaseException
valueFromRow
in class DatabaseMapping
DatabaseException
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)
writeFromObjectIntoRow
in class DatabaseMapping
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, DatabaseMapping.WriteType writeType)
writeFromObjectIntoRowWithChangeRecord
in class DatabaseMapping
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow
in class DatabaseMapping
public java.lang.Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
getFieldClassification
in class DatabaseMapping
public boolean isCollectionMapping()
DatabaseMapping
isCollectionMapping
in class DatabaseMapping
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
DatabaseMapping
convertClassNamesToClasses
in class DatabaseMapping
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 DatabaseMapping
public boolean compareObjects(java.lang.Object object1, java.lang.Object object2, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects
in class DatabaseMapping
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)
mergeChangesIntoObject
in class DatabaseMapping
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)
mergeIntoObject
in class DatabaseMapping
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 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)