AbstractCompositeDirectCollectionMapping consolidates the behavior of mappings that
map collections of "native" data objects (e.g. Strings).
These are objects that do not have their own descriptor and repeat within the XML record
for the containing object.
| Modifier and Type | Field and Description |
|---|---|
| private ContainerPolicy | containerPolicy
This determines the type of container used to hold the nested collection in the object. |
| protected String | elementDataTypeName
This is the "data type" associated with each element in the nested collection. |
| protected 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. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Object | buildAddedElementFromChangeSet(Object changeSet, MergeManager mergeManager, AbstractSession targetSession)
Implements org. |
| public void | buildBackupClone(Object
TODO clone, Object TODO backup, UnitOfWorkImpl TODO unitOfWork)Implements abstract org. |
| public Object | buildChangeSet(Object element, ObjectChangeSet owner, AbstractSession session)
Implements org. |
| public void | buildClone(Object
TODO original, CacheKey TODO cacheKey, Object TODO clone, Integer TODO refreshCascade, AbstractSession TODO cloningSession)Implements abstract org. |
| public void | buildCloneFromRow(AbstractRecord
TODO row, JoinedAttributeManager TODO joinManager, Object TODO clone, CacheKey TODO sharedCacheKey, ObjectBuildingQuery TODO sourceQuery, UnitOfWorkImpl TODO unitOfWork, AbstractSession TODO executionSession)Implements abstract org. |
| protected Object | buildClonePart(Object attributeValue, CacheKey parentCacheKey, AbstractSession cloningSession)
Build and return a clone of the specified attribute value. |
| public void | buildCopy(Object
TODO copy, Object TODO original, CopyGroup TODO group)Overrides org. |
| protected Object | buildElementFromChangeSet(Object changeSet, MergeManager mergeManager, AbstractSession targetSession)
Build and return a new element based on the change set. |
| public Object | buildElementFromElement(Object object, MergeManager mergeManager, AbstractSession targetSession)
Implements org. |
| public Object | buildRemovedElementFromChangeSet(Object changeSet, MergeManager mergeManager, AbstractSession targetSession)
Implements org. |
| public void | cascadePerformRemoveIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)Implements abstract org. |
| public void | cascadeRegisterNewIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)Implements abstract org. |
| protected Vector | collectFields()
Overrides org. |
| public boolean | compareElements(Object element1, Object element2, AbstractSession session)
Implements org. |
| public boolean | compareElementsForChange(Object element1, Object element2, AbstractSession session)
Implements org. |
| public ChangeRecord | compareForChange(Object
TODO clone, Object TODO backup, ObjectChangeSet TODO owner, AbstractSession TODO session)Implements abstract org. |
| public boolean | compareObjects(Object
TODO object1, Object TODO object2, AbstractSession TODO session)Implements abstract org. |
| public void | convertClassNamesToClasses(ClassLoader
TODO classLoader)Overrides org. |
| protected ChangeRecord | |
| public Object | createMapComponentFromRow(AbstractRecord dbRow, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected)
INTERNAL Called when a DatabaseMapping is used to map the key in a collection. |
| public void | fixObjectReferences(Object
TODO object, Map<Object, ObjectDescriptor> TODO objectDescriptors, Map<Object, Object> TODO processedObjects, ObjectLevelReadQuery TODO query, DistributedSession TODO session)Implements abstract org. |
| public 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. |
| public ContainerPolicy | getContainerPolicy()
Overrides org. Implements org. |
| public DatabaseField | getField()
Overrides org. |
| public Class | getFieldClassification(DatabaseField fieldToClassify)
Overrides org. |
| public 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. |
| public String | |
| public Object | getRealCollectionAttributeValueFromObject(Object object, AbstractSession session)
Overrides org. Implements org. |
| public Converter | |
| public boolean | |
| public void | initialize(AbstractSession session)
Overrides org. |
| public boolean | |
| public boolean | isCollectionMapping()
Overrides org. |
| public void | iterate(DescriptorIterator iterator)
Implements abstract org. |
| public boolean | mapKeyHasChanged(Object element, AbstractSession session)
Implements org. |
| public void | mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession)
Implements abstract org. |
| public void | mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession)
Implements abstract org. |
| public void | setAttributeElementClass(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. |
| public void | setAttributeElementClassName(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. |
| public void | setContainerPolicy(ContainerPolicy containerPolicy)
Implements org. |
| public void | |
| public void | setFieldElementClass(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. |
| public void | setUsesSingleNode(boolean
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 node usesSingleNode)PUBLIC: Sets whether the mapping uses a single node. |
| public void | |
| public void | simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session)
Overrides org. |
| public void | simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session)
Overrides org. |
| public void | useCollectionClass(Class<?> concreteClass)
Implements org. |
| public void | useCollectionClassName(String concreteClassName)
Implements org. |
| public void | useListClassName(String concreteClassName)
Implements org. |
| public void | useMapClass(Class<?> concreteClass, String methodName)
Implements org. |
| public void | useMapClassName(String concreteContainerClassName, String methodName)
Implements org. |
| public boolean | Returns: 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 node.PUBLIC: Checks whether the mapping uses a single node. |
| public Object | valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed)
Overrides org. |
| public void | writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, DatabaseMapping.
Overrides org. |
| public void | writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, AbstractRecord row)
Overrides org. |
| public void | writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session, DatabaseMapping.
Overrides org. |
| public void | writeInsertFieldsIntoRow(AbstractRecord row, AbstractSession session)
Overrides org. |