Purpose:Two objects can be considered to be related by aggregation if there is a strict 1:1 relationship between the objects. This means that the target (child or owned) object cannot exist without the source (parent) object. In TopLink, it also means the data for the owned object is stored in the same table as the parent.
| Modifier and Type | Field and Description |
|---|---|
| protected DatabaseTable | |
| protected Map | aggregateToSourceFields
322233 - changed to store the source DatabaseField to hold Case and other colunm info |
| protected Map | converters
List of converters to apply at initialize time to their cloned aggregate mappings. |
| protected boolean | isNullAllowed
If all the fields in the database row for the aggregate object are NULL, then, by default, the mapping will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
| protected List | mapsIdMappings
List of maps id mappings that need to be set to read only at initialize time on their cloned aggregate mappings. |
| protected Map | nestedFieldTranslations
Map of nested attributes that need to apply an override name to their a nested aggregate mapping's database field. |
| protected List | overrideManyToManyMappings
List of many to many mapping overrides to apply at initialize time to their cloned aggregate mappings. |
| protected List | overrideUnidirectionalOneToManyMappings
List of unidirectional one to many mapping overrides to apply at initialize time to their cloned aggregate mappings. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAdditionalFieldsToQuery(ReadQuery selectionQuery, Expression baseExpression)
Implements org. |
| public void | addConverter(Converter converter, String attributeName)
Implements org. |
| public void | addFieldNameTranslation(String sourceFieldName, String aggregateFieldName)
PUBLIC: Add a field name translation that maps from a field name in the source table to a field name in the aggregate descriptor. |
| public void | addFieldsForMapKey(AbstractRecord joinRow)
Implements org. |
| public void | addFieldTranslation(DatabaseField sourceField, String aggregateFieldName)
Implements org. |
| public void | addKeyToDeletedObjectsList(Object object, Map<K, V> deletedObjects)
Implements org. |
| public void | addMapsIdMapping(DatabaseMapping mapping)
INTERNAL: In JPA users may specify a maps id mapping on a shared embeddable descriptor. |
| public void | addNestedFieldTranslation(String attributeName, DatabaseField sourceField, String aggregateFieldName)
Implements org. |
| public void | addOverrideManyToManyMapping(ManyToManyMapping mapping)
Implements org. |
| public void | addOverrideUnidirectionalOneToManyMapping(UnidirectionalOneToManyMapping mapping)
Implements org. |
| public void | addPrimaryKeyJoinField(DatabaseField primaryKeyField, DatabaseField secondaryField)
INTERNAL: Add a primary key join column (secondary field). |
| protected boolean | allAggregateFieldsAreNull(AbstractRecord databaseRow)
INTERNAL: Return whether all the aggregate fields in the specified row are NULL. |
| public void | allowNull()
PUBLIC: If all the fields in the database row for the aggregate object are NULL, then, by default, the mapping will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
| protected boolean | backupAttributeValueIsNull(WriteObjectQuery query)
INTERNAL: Return whether the query's backup object has an attribute value of null. |
| public Object | buildAggregateFromRow(AbstractRecord databaseRow, Object targetObject, CacheKey cacheKey, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, boolean buildShallowOriginal, AbstractSession executionSession, boolean targetIsProtected)
INTERNAL: Build and return an aggregate object from the specified row. |
| public void | buildClone(Object
TODO original, CacheKey TODO cacheKey, Object TODO clone, Integer TODO refreshCascade, AbstractSession TODO cloningSession)Overrides org. |
| public void | buildCloneFromRow(AbstractRecord
TODO databaseRow, JoinedAttributeManager TODO joinManager, Object TODO clone, CacheKey TODO sharedCacheKey, ObjectBuildingQuery TODO sourceQuery, UnitOfWorkImpl TODO unitOfWork, AbstractSession TODO executionSession)Overrides org. |
| public Object | buildElementClone(Object attributeValue, Object parent, CacheKey parentCacheKey, Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)
Implements org. |
| public Expression | buildObjectJoinExpression(Expression
TODO expression, Object TODO value, AbstractSession TODO session)Overrides org. |
| public Expression | buildObjectJoinExpression(Expression
TODO expression, Expression TODO argument, AbstractSession TODO session)Overrides org. |
| public ReadQuery | buildSelectionQueryForDirectCollectionKeyMapping(ContainerPolicy containerPolicy)
Implements org. |
| public void | buildShallowOriginalFromRow(AbstractRecord
TODO databaseRow, Object TODO original, JoinedAttributeManager TODO joinManager, ObjectBuildingQuery TODO sourceQuery, AbstractSession TODO executionSession)Overrides org. |
| protected AbstractRecord | buildTemplateInsertRow(AbstractSession session)
INTERNAL: Build and return a "template" database row with all the fields set to null. |
| protected CacheKey | buildWrapperCacheKeyForAggregate(CacheKey
- the cache key holding the object to extract the aggregate from owningCacheKey, boolean targetIsProtected)INTERNAL: Wrap the aggregate represented by this mapping in a cachekey so it can be processed my methods down the stack. |
| public void | cascadeDiscoverAndPersistUnregisteredNewObjects(Object object, Map<K, V> newObjects, Map<K, V> unregisteredExistingObjects, Map<K, V> visitedObjects, UnitOfWorkImpl uow, boolean getAttributeValueFromObject, Set<E> cascadeErrors)
Implements org. |
| public void | cascadePerformRemoveIfRequired(Object object, UnitOfWorkImpl uow, Map<K, V> visitedObjects, boolean getAttributeValueFromObject)
Implements org. |
| public void | cascadePerformRemoveIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)Implements abstract org. |
| public void | cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)
INTERNAL:
Cascade perform removal of orphaned private owned objects from the UnitOfWorkChangeSet
|
| public void | cascadeRegisterNewIfRequired(Object object, UnitOfWorkImpl uow, Map<K, V> visitedObjects, boolean getAttributeValueFromObject)
Implements org. |
| public void | cascadeRegisterNewIfRequired(Object
TODO object, UnitOfWorkImpl TODO uow, Map<K, V> TODO visitedObjects)Implements abstract org. |
| public Object | clone()
Overrides org. Implements org. |
| protected Vector | collectFields()
Overrides org. |
| public void | collectQueryParameters(Set<DatabaseField>
TODO record)Overrides org. |
| public void | convertClassNamesToClasses(ClassLoader
TODO classLoader)Overrides org. |
| public Object | createMapComponentFromJoinedRow(AbstractRecord dbRow, JoinedAttributeManager joinManger, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected)
Implements org. |
| public Object | createMapComponentFromRow(AbstractRecord dbRow, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected)
Implements org. |
| public List | createMapComponentsFromSerializableKeyInfo(Object[] keyInfo, AbstractSession session)
Implements org. |
| public QueryKey | createQueryKeyForMapKey()
Implements org. |
| public Object | createSerializableMapKeyInfo(Object key, AbstractSession session)
Implements org. |
| public Object | createStubbedMapComponentFromSerializableKeyInfo(Object keyInfo, AbstractSession session)
Implements org. |
| public void | deleteMapKey(Object objectDeleted, AbstractSession session)
Implements org. |
| public void | dontAllowNull()
PUBLIC: If all the fields in the database row for the aggregate object are NULL, then, by default, the mapping will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
| public void | earlyPreDelete(DeleteObjectQuery
TODO query, Object TODO object)Overrides org. |
| public Map | extractIdentityFieldsForQuery(Object object, AbstractSession session)
Implements org. |
| public Expression | getAdditionalSelectionCriteriaForMapKey()
Implements org. |
| public List | getAdditionalTablesForJoinQuery()
Implements org. |
| public Vector | getAggregateToSourceFieldAssociations()
INTERNAL: Return a collection of the aggregate to source field associations. |
| public Map | getAggregateToSourceFields()
INTERNAL: Return the hashtable that stores aggregate field name to source fields. |
| public List | getAllFieldsForMapKey()
Implements org. |
| public Class | getAttributeClassification()
Overrides org. |
| public Class | getFieldClassification(DatabaseField fieldToClassify)
Overrides org. |
| public Map | getForeignKeyFieldsForMapKey()
Implements org. |
| public List | getIdentityFieldsForMapKey()
Implements org. |
| public Object | getMapKeyTargetType()
Implements org. |
| protected Object | getMatchingAttributeValueFromObject(AbstractRecord row, Object targetObject, AbstractSession session, ClassDescriptor descriptor)
INTERNAL: This is used to preserve object identity during a refreshObject() query. |
| protected Object | getMatchingBackupAttributeValue(WriteObjectQuery query, Object attributeValue)
INTERNAL: This is used to match up objects during an update in a UOW. |
| public Map | getNestedFieldTranslations()
INTERNAL: Return the hashtable that stores the nested field translations. |
| public ObjectLevelReadQuery | getNestedJoinQuery(JoinedAttributeManager joinManager, ObjectLevelReadQuery query, AbstractSession session)
Implements org. |
| public List | getOrderByNormalizedExpressions(Expression base)
Overrides org. |
| public ClassDescriptor | getReferenceDescriptor(Class<?> theClass, AbstractSession session)
Overrides org. |
| protected Vector | |
| public Object | getTargetVersionOfSourceObject(Object object, Object parent, MergeManager mergeManager, AbstractSession targetSession)
Implements org. |
| public boolean | hasDependency()
Overrides org. |
| public void | initialize(AbstractSession session)
Overrides org. |
| public void | initializeChildInheritance(ClassDescriptor parentDescriptor, AbstractSession session)
INTERNAL: For an aggregate mapping the reference descriptor is cloned. |
| public void | initializeParentInheritance(ClassDescriptor parentDescriptor, ClassDescriptor childDescriptor, AbstractSession session)
INTERNAL: For an aggregate mapping the reference descriptor is cloned. |
| protected void | initializeReferenceDescriptor(ClassDescriptor clonedDescriptor, AbstractSession session)
INTERNAL: Initialize the cloned reference descriptor with table names and primary keys |
| public boolean | isAggregateObjectMapping()
Overrides org. |
| public boolean | isCascadedLockingSupported()
Overrides org. |
| public boolean | isChangeTrackingSupported(Project project)
Overrides org. |
| public boolean | isJPAIdNested(AbstractSession session)
INTERNAL: Flags that either this mapping or nested mapping is a JPA id mapping. |
| public boolean | isLockableMapping()
Overrides org. |
| public boolean | isNullAllowed()
PUBLIC: Return if all the fields in the database row for the aggregate object are NULL, then, by default, the mapping will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
| public boolean | isRelationalMapping()
Overrides org. |
| public void | iterateOnMapKey(DescriptorIterator iterator, Object element)
Implements org. |
| public void | postInitialize(AbstractSession session)
Overrides org. |
| public void | postInitializeMapKey(MappedKeyMapContainerPolicy policy)
Implements org. |
| public void | preinitializeMapKey(DatabaseTable table)
Implements org. |
| public ObjectBuildingQuery | prepareNestedQuery(ObjectBuildingQuery sourceQuery)
INTERNAL: Clone and prepare the selection query as a nested batch read query. |
| public Object | readFromReturnRowIntoObject(AbstractRecord row, Object targetObject, ReadObjectQuery query, Collection<E> handledMappings, ObjectChangeSet changeSet)
INTERNAL: Build an aggregate object from the specified return row and put it in the specified target object. |
| public Object | readFromRowIntoObject(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object targetObject, CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean isTargetProtected)
Overrides org. |
| public void | rehashFieldDependancies(AbstractSession session)
Overrides org. |
| public boolean | requiresDataModificationEventsForMapKey()
Implements org. |
| public void | setAggregateToSourceFieldAssociations(Vector<Association> fieldAssociations)
INTERNAL: Set a collection of the aggregate to source field name associations. |
| public void | setAggregateToSourceFields(Map<String, DatabaseField> aggregateToSource)
INTERNAL: Set the hashtable that stores target field name to the source field name. |
| public void | setChangeListener(Object clone, PropertyChangeListener listener, UnitOfWorkImpl uow)
Overrides org. |
| public void | setIsNullAllowed(boolean isNullAllowed)
PUBLIC: Configure if all the fields in the database row for the aggregate object are NULL, then, by default, the mapping will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
| public void | setNestedFieldTranslations(Map<String, Object[]> fieldTranslations)
INTERNAL: Set the hashtable that stores a field in the source table to a field name in a nested aggregate descriptor. |
| public void | setTableForAggregateMappingKey(DatabaseTable table)
INTERNAL: If this mapping is used as the key of a CollectionTableMapMapping, the table used by this mapping will be the relation table. |
| protected void | translateField(DatabaseField sourceField, DatabaseField mappingField, ClassDescriptor clonedDescriptor)
INTERNAL: Apply the field translation from the sourceField to the mappingField. |
| protected void | translateFields(ClassDescriptor clonedDescriptor, AbstractSession session)
INTERNAL: If field names are different in the source and aggregate objects then the translation is done here. |
| protected void | translateNestedFields(ClassDescriptor clonedDescriptor, AbstractSession session)
INTERNAL: If field names are different in the source and aggregate objects then the translation is done here. |
| public Object | unwrapKey(Object key, AbstractSession session)
Implements org. |
| public Object | valueFromObject(Object
TODO object, DatabaseField TODO field, AbstractSession TODO session)Overrides org. |
| public Object | wrapKey(Object key, AbstractSession session)
Implements org. |
| public void | writeFromAttributeIntoRow(Object attribute, AbstractRecord row, AbstractSession session)
Overrides org. |
| public void | writeFromObjectIntoRow(Object object, AbstractRecord databaseRow, AbstractSession session, DatabaseMapping.
Overrides org. |
| public void | writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord row, AbstractSession session)
Overrides org. |
| public void | writeFromObjectIntoRowForUpdate(WriteObjectQuery query, AbstractRecord databaseRow)
Overrides org. |
| public void | writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, AbstractRecord row, AbstractSession session, DatabaseTable table)
Overrides org. |
| public void | writeFromObjectIntoRowForUpdateBeforeShallowDelete(Object object, AbstractRecord row, AbstractSession session, DatabaseTable table)
Overrides org. |
| public void | writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord databaseRow, AbstractSession session, DatabaseMapping.
Overrides org. |
| public void | writeInsertFieldsIntoRow(AbstractRecord databaseRow, AbstractSession session)
Overrides org. |
| protected void | writeNullReferenceRow(AbstractRecord record)
INTERNAL: Write null values for all aggregate fields into the parent row. |
| protected void | writeToRowFromAggregate(AbstractRecord record, Object object, Object attributeValue, AbstractSession session, DatabaseMapping.
INTERNAL: Write the aggregate values into the parent row. |
| protected void | writeToRowFromAggregateForShallowInsert(AbstractRecord record, Object object, Object attributeValue, AbstractSession session)
INTERNAL: Write the aggregate values into the parent row for shallow insert. |
| protected void | writeToRowFromAggregateForUpdate(AbstractRecord record, WriteObjectQuery query, Object attributeValue)
INTERNAL: Build and return a database row built with the changed values from the specified attribute value. |
| protected void | writeToRowFromAggregateForUpdateAfterShallowInsert(AbstractRecord record, Object object, Object attributeValue, AbstractSession session, DatabaseTable table)
INTERNAL: Write the aggregate values into the parent row for update after shallow insert. |
| protected void | writeToRowFromAggregateForUpdateBeforeShallowDelete(AbstractRecord record, Object object, Object attributeValue, AbstractSession session, DatabaseTable table)
INTERNAL: Write the aggregate values into the parent row for update before shallow delete. |
| protected void | writeToRowFromAggregateWithChangeRecord(AbstractRecord record, ChangeRecord changeRecord, ObjectChangeSet objectChangeSet, AbstractSession session, DatabaseMapping.
INTERNAL: Build and return a database row built with the values from the specified attribute value. |
| public void | writeUpdateFieldsIntoRow(AbstractRecord databaseRow, AbstractSession session)
Overrides org. |