Class AggregateObjectMapping
- java.lang.Object
-
- org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
-
- org.eclipse.persistence.mappings.DatabaseMapping
-
- org.eclipse.persistence.mappings.AggregateMapping
-
- org.eclipse.persistence.mappings.AggregateObjectMapping
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,EmbeddableMapping,MapComponentMapping,MapKeyMapping,RelationalMapping
public class AggregateObjectMapping extends AggregateMapping implements RelationalMapping, MapKeyMapping, EmbeddableMapping
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.
- See Also:
- Serialized Form
- Author:
- Sati
- Since:
- TOPLink/Java 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.persistence.internal.helper.DatabaseTableaggregateKeyTableprotected java.util.Map<java.lang.String,org.eclipse.persistence.internal.helper.DatabaseField>aggregateToSourceFields322233 - changed to store the source DatabaseField to hold Case and other colunm infoprotected java.util.Map<java.lang.String,Converter>convertersList of converters to apply at initialize time to their cloned aggregate mappings.protected booleanisNullAllowedIf 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 java.util.List<DatabaseMapping>mapsIdMappingsList of maps id mappings that need to be set to read only at initialize time on their cloned aggregate mappings.protected java.util.Map<java.lang.String,java.lang.Object[]>nestedFieldTranslationsMap of nested attributes that need to apply an override name to their a nested aggregate mapping's database field.protected java.util.List<ManyToManyMapping>overrideManyToManyMappingsList of many to many mapping overrides to apply at initialize time to their cloned aggregate mappings.protected java.util.List<UnidirectionalOneToManyMapping>overrideUnidirectionalOneToManyMappingsList of unidirectional one to many mapping overrides to apply at initialize time to their cloned aggregate mappings.-
Fields inherited from class org.eclipse.persistence.mappings.AggregateMapping
hasNestedIdentityReference, referenceClass, referenceClassName, referenceDescriptor
-
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
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 Summary
Constructors Constructor Description AggregateObjectMapping()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalFieldsToQuery(ReadQuery selectionQuery, Expression baseExpression)INTERNAL: Used when initializing queries for mappings that use a Map Called when the selection query is being initialized to add the fields for the map key to the queryvoidaddConverter(Converter converter, java.lang.String attributeName)Add a converter to be applied to a mapping of the aggregate descriptor.voidaddFieldNameTranslation(java.lang.String sourceFieldName, java.lang.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.voidaddFieldsForMapKey(org.eclipse.persistence.internal.sessions.AbstractRecord joinRow)INTERNAL: Used when initializing queries for mappings that use a Map Called when the insert query is being initialized to ensure the fields for the map key are in the insert queryvoidaddFieldTranslation(org.eclipse.persistence.internal.helper.DatabaseField sourceField, java.lang.String aggregateFieldName)PUBLIC: Add a field translation that maps from a field in the source table to a field name in the aggregate descriptor.voidaddKeyToDeletedObjectsList(java.lang.Object object, java.util.Map deletedObjects)INTERNAL: For mappings used as MapKeys in MappedKeyContainerPolicy.voidaddMapsIdMapping(DatabaseMapping mapping)INTERNAL: In JPA users may specify a maps id mapping on a shared embeddable descriptor.voidaddNestedFieldTranslation(java.lang.String attributeName, org.eclipse.persistence.internal.helper.DatabaseField sourceField, java.lang.String aggregateFieldName)INTERNAL: Add a nested field translation that maps from a field in the source table to a field name in a nested aggregate descriptor.voidaddOverrideManyToManyMapping(ManyToManyMapping mapping)INTERNAL: In JPA users may specify overrides to apply to a many to many mapping on a shared embeddable descriptor.voidaddOverrideUnidirectionalOneToManyMapping(UnidirectionalOneToManyMapping mapping)INTERNAL: In JPA users may specify overrides to apply to a unidirectional one to many mapping on a shared embeddable descriptor.voidaddPrimaryKeyJoinField(org.eclipse.persistence.internal.helper.DatabaseField primaryKeyField, org.eclipse.persistence.internal.helper.DatabaseField secondaryField)INTERNAL: Add a primary key join column (secondary field).protected booleanallAggregateFieldsAreNull(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow)INTERNAL: Return whether all the aggregate fields in the specified row are NULL.voidallowNull()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 booleanbackupAttributeValueIsNull(WriteObjectQuery query)INTERNAL: Return whether the query's backup object has an attribute value of null.java.lang.ObjectbuildAggregateFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object targetObject, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, boolean buildShallowOriginal, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean targetIsProtected)INTERNAL: Build and return an aggregate object from the specified row.voidbuildClone(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.voidbuildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, 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: A combination of readFromRowIntoObject and buildClone.java.lang.ObjectbuildElementClone(java.lang.Object attributeValue, java.lang.Object parent, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)INTERNAL: Build a clone of the given element in a unitOfWorkExpressionbuildObjectJoinExpression(Expression expression, java.lang.Object value, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Used to allow object level comparisons.ExpressionbuildObjectJoinExpression(Expression expression, Expression argument, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Used to allow object level comparisons.ReadQuerybuildSelectionQueryForDirectCollectionKeyMapping(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)INTERNAL: Certain key mappings favor different types of selection query.voidbuildShallowOriginalFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object original, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)INTERNAL: Builds a shallow original object.protected org.eclipse.persistence.internal.sessions.AbstractRecordbuildTemplateInsertRow(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Build and return a "template" database row with all the fields set to null.protected org.eclipse.persistence.internal.identitymaps.CacheKeybuildWrapperCacheKeyForAggregate(org.eclipse.persistence.internal.identitymaps.CacheKey owningCacheKey, boolean targetIsProtected)INTERNAL: Wrap the aggregate represented by this mapping in a cachekey so it can be processed my methods down the stack.voidcascadeDiscoverAndPersistUnregisteredNewObjects(java.lang.Object object, java.util.Map newObjects, java.util.Map unregisteredExistingObjects, java.util.Map visitedObjects, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, boolean getAttributeValueFromObject, java.util.Set cascadeErrors)INTERNAL: Cascade discover and persist new objects during commit to the map keyvoidcascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade perform delete through mappings that require the cascadevoidcascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects, boolean getAttributeValueFromObject)INTERNAL: Cascade perform delete through mappings that require the cascadevoidcascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade perform removal of orphaned private owned objects from the UnitOfWorkChangeSetvoidcascadeRegisterNewIfRequired(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 cascadevoidcascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects, boolean getAttributeValueFromObject)INTERNAL: Cascade registerNew for Create through mappings that require the cascadejava.lang.Objectclone()INTERNAL: Clone the aggregate to source field names.protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField>collectFields()INTERNAL: Return the fields handled by the mapping.voidcollectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> record)INTERNAL: This method is used to store the FK fields that can be cached that correspond to noncacheable mappings the FK field values will be used to re-issue the query when cloning the shared cache entityvoidconvertClassNamesToClasses(java.lang.ClassLoader classLoader)INTERNAL: Convert all the class-name-based settings in this mapping to actual class-based settings.java.lang.ObjectcreateMapComponentFromJoinedRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger, 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 and a join query is executed.java.lang.ObjectcreateMapComponentFromRow(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.java.util.List<java.lang.Object>createMapComponentsFromSerializableKeyInfo(java.lang.Object[] keyInfo, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Create an instance of the Key object from the key information extracted from the map.QueryKeycreateQueryKeyForMapKey()INTERNAL: Create a query key that links to the map keyjava.lang.ObjectcreateSerializableMapKeyInfo(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Creates the Array of simple types used to recreate this map.java.lang.ObjectcreateStubbedMapComponentFromSerializableKeyInfo(java.lang.Object keyInfo, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Create an instance of the Key object from the key information extracted from the map.voiddeleteMapKey(java.lang.Object objectDeleted, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: For mappings used as MapKeys in MappedKeyContainerPolicy, Delete the passed object if necessary.voiddontAllowNull()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).voidearlyPreDelete(DeleteObjectQuery query, java.lang.Object object)INTERNAL: This method is called to update collection tables prior to commit.java.util.MapextractIdentityFieldsForQuery(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Extract the fields for the Map key from the object to use in a query.ExpressiongetAdditionalSelectionCriteriaForMapKey()INTERNAL: Return the selection criteria necessary to select the target object when this mapping is a map key.java.util.List<org.eclipse.persistence.internal.helper.DatabaseTable>getAdditionalTablesForJoinQuery()INTERNAL: Return any tables that will be required when this mapping is used as part of a join queryjava.util.Vector<Association>getAggregateToSourceFieldAssociations()INTERNAL: Return a collection of the aggregate to source field associations.java.util.Map<java.lang.String,org.eclipse.persistence.internal.helper.DatabaseField>getAggregateToSourceFields()INTERNAL: Return the hashtable that stores aggregate field name to source fields.java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>getAllFieldsForMapKey()INTERNAL: Get all the fields for the map keyjava.lang.ClassgetAttributeClassification()PUBLIC: The classification type for the attribute this mapping representsjava.lang.ClassgetFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)INTERNAL: Return the classification for the field contained in the mapping.java.util.Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField>getForeignKeyFieldsForMapKey()INTERNAL: Return a Map of any foreign keys defined within the the MapKeyjava.util.List<org.eclipse.persistence.internal.helper.DatabaseField>getIdentityFieldsForMapKey()INTERNAL: Return the fields that make up the identity of the mapped object.java.lang.ObjectgetMapKeyTargetType()INTERNAL: Return the class this key mapping maps or the descriptor for itprotected java.lang.ObjectgetMatchingAttributeValueFromObject(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object targetObject, org.eclipse.persistence.internal.sessions.AbstractSession session, ClassDescriptor descriptor)INTERNAL: This is used to preserve object identity during a refreshObject() query.protected java.lang.ObjectgetMatchingBackupAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)INTERNAL: This is used to match up objects during an update in a UOW.java.util.Map<java.lang.String,java.lang.Object[]>getNestedFieldTranslations()INTERNAL: Return the hashtable that stores the nested field translations.ObjectLevelReadQuerygetNestedJoinQuery(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectLevelReadQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Return the query that is used when this mapping is part of a joined relationship This method is used when this mapping is used to map the key in a Mapjava.util.List<Expression>getOrderByNormalizedExpressions(Expression base)INTERNAL: Aggregate order by all their fields by default.ClassDescriptorgetReferenceDescriptor(java.lang.Class theClass, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Since aggregate object mappings clone their descriptors, for inheritance the correct child clone must be found.protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField>getReferenceFields()INTERNAL: Return the fields used to build the aggregate object.java.lang.ObjectgetTargetVersionOfSourceObject(java.lang.Object object, java.lang.Object parent, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: If required, get the targetVersion of the source object from the merge manager.booleanhasDependency()INTERNAL: Return if the mapping has any ownership or other dependency over its target object(s).voidinitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: For an aggregate mapping the reference descriptor is cloned.voidinitializeChildInheritance(ClassDescriptor parentDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: For an aggregate mapping the reference descriptor is cloned.voidinitializeParentInheritance(ClassDescriptor parentDescriptor, ClassDescriptor childDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: For an aggregate mapping the reference descriptor is cloned.protected voidinitializeReferenceDescriptor(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Initialize the cloned reference descriptor with table names and primary keysbooleanisAggregateObjectMapping()INTERNAL: Related mapping should implement this method to return true.booleanisCascadedLockingSupported()INTERNAL Return true if this mapping supports cascaded version optimistic locking.booleanisChangeTrackingSupported(Project project)INTERNAL: Return if this mapping supports change tracking.booleanisJPAIdNested(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Flags that either this mapping or nested mapping is a JPA id mapping.booleanisLockableMapping()INTERNAL: Return whether this mapping should be traversed when we are lockingbooleanisNullAllowed()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).booleanisRelationalMapping()INTERNAL:voiditerateOnMapKey(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object element)INTERNAL: Called when iterating through descriptors to handle iteration on this mapping when it is used as a MapKeyvoidpostInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: For an aggregate mapping the reference descriptor is cloned.voidpostInitializeMapKey(org.eclipse.persistence.internal.queries.MappedKeyMapContainerPolicy policy)INTERNAL: Making any mapping changes necessary to use a the mapping as a map key after initializing the mapping.voidpreinitializeMapKey(org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: Making any mapping changes necessary to use a the mapping as a map key prior to initializing the mappingObjectBuildingQueryprepareNestedQuery(ObjectBuildingQuery sourceQuery)INTERNAL: Clone and prepare the selection query as a nested batch read query.java.lang.ObjectreadFromReturnRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object targetObject, ReadObjectQuery query, java.util.Collection handledMappings, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet)INTERNAL: Build an aggregate object from the specified return row and put it in the specified target object.java.lang.ObjectreadFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object targetObject, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected)INTERNAL: Build an aggregate object from the specified row and put it in the specified target object.voidrehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Rehash any hashtables based on fields.booleanrequiresDataModificationEventsForMapKey()INTERNAL: Return whether this mapping requires extra queries to update the rows if it is used as a key in a map.voidsetAggregateToSourceFieldAssociations(java.util.Vector<Association> fieldAssociations)INTERNAL: Set a collection of the aggregate to source field name associations.voidsetAggregateToSourceFields(java.util.Map<java.lang.String,org.eclipse.persistence.internal.helper.DatabaseField> aggregateToSource)INTERNAL: Set the hashtable that stores target field name to the source field name.voidsetChangeListener(java.lang.Object clone, java.beans.PropertyChangeListener listener, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)INTERNAL: Set the change listener in the aggregate.voidsetIsNullAllowed(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).voidsetNestedFieldTranslations(java.util.Map<java.lang.String,java.lang.Object[]> fieldTranslations)INTERNAL: Set the hashtable that stores a field in the source table to a field name in a nested aggregate descriptor.voidsetTableForAggregateMappingKey(org.eclipse.persistence.internal.helper.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 voidtranslateField(org.eclipse.persistence.internal.helper.DatabaseField sourceField, org.eclipse.persistence.internal.helper.DatabaseField mappingField, ClassDescriptor clonedDescriptor)INTERNAL: Apply the field translation from the sourceField to the mappingField.protected voidtranslateFields(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: If field names are different in the source and aggregate objects then the translation is done here.protected voidtranslateNestedFields(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: If field names are different in the source and aggregate objects then the translation is done here.java.lang.ObjectunwrapKey(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Allow the key mapping to unwrap the object.java.lang.ObjectvalueFromObject(java.lang.Object object, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Extract value of the field from the objectjava.lang.ObjectwrapKey(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Allow the key mapping to wrap the object.voidwriteFromAttributeIntoRow(java.lang.Object attribute, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: A subclass should implement this method if it wants different behavior.voidwriteFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, 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.voidwriteFromObjectIntoRowForShallowInsert(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.voidwriteFromObjectIntoRowForUpdate(WriteObjectQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow)INTERNAL: Get the attribute value from the object and add the changed values to the specified database row.voidwriteFromObjectIntoRowForUpdateAfterShallowInsert(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: This row is built for update after shallow insert which happens in case of bidirectional inserts.voidwriteFromObjectIntoRowForUpdateBeforeShallowDelete(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: This row is built for update before shallow delete which happens in case of bidirectional inserts.voidwriteFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, 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.voidwriteInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Write fields needed for insert into the template for with null values.protected voidwriteNullReferenceRow(org.eclipse.persistence.internal.sessions.AbstractRecord record)INTERNAL: Write null values for all aggregate fields into the parent row.protected voidwriteToRowFromAggregate(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Write the aggregate values into the parent row.protected voidwriteToRowFromAggregateForShallowInsert(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Write the aggregate values into the parent row for shallow insert.protected voidwriteToRowFromAggregateForUpdate(org.eclipse.persistence.internal.sessions.AbstractRecord record, WriteObjectQuery query, java.lang.Object attributeValue)INTERNAL: Build and return a database row built with the changed values from the specified attribute value.protected voidwriteToRowFromAggregateForUpdateAfterShallowInsert(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: Write the aggregate values into the parent row for update after shallow insert.protected voidwriteToRowFromAggregateForUpdateBeforeShallowDelete(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: Write the aggregate values into the parent row for update before shallow delete.protected voidwriteToRowFromAggregateWithChangeRecord(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType)INTERNAL: Build and return a database row built with the values from the specified attribute value.voidwriteUpdateFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Write fields needed for update into the template for with null values.-
Methods inherited from class org.eclipse.persistence.mappings.AggregateMapping
buildAggregateDeleteQuery, buildAggregateModifyQuery, buildAggregateWriteQuery, buildBackupClone, buildBackupClonePart, buildClonePart, buildClonePart, buildCopy, buildCopyOfAttributeValue, buildExpression, buildNewMergeInstanceOf, compareAttributeValues, compareForChange, compareObjects, executeEvent, fixAttributeValue, fixObjectReferences, getAttributeValueFromBackupClone, getObjectBuilder, getObjectBuilderForClass, getQueryManager, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getReferenceDescriptor, hasNestedIdentityReference, isAggregateMapping, iterate, iterateOnAttributeValue, load, loadAll, mergeAttributeValue, mergeChangesIntoObject, mergeIntoObject, postDelete, postDeleteAttributeValue, postInsert, postInsertAttributeValue, postUpdate, postUpdateAttributeValue, preDelete, preDeleteAttributeValue, preInsert, preInsertAttributeValue, preUpdate, preUpdateAttributeValue, remoteInitialization, setReferenceClass, setReferenceClassName, setReferenceDescriptor, updateChangeRecord, verifyDelete, verifyDeleteOfAttributeValue
-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cloneFields, convertConverterClassNamesToClasses, createCloneValueHolder, derivesId, extractNestedExpressions, extractNestedNonAggregateExpressions, fixRealObjectReferences, getAttributeAccessor, getAttributeName, getAttributeValueFromObject, getContainerPolicy, getDerivedIdMapping, getDescriptor, getField, getFields, getGetMethodName, getMapsIdValue, getObjectCorrespondingTo, getProperties, getProperty, getRealAttributeValueFromAttribute, getRealAttributeValueFromObject, getRealCollectionAttributeValueFromObject, getRelationshipPartner, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getValueFromRemoteValueHolder, getWeight, hasConstraintDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, instantiateAttribute, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAttributeValueFromObjectInstantiated, isCacheable, isCandidateForPrivateOwnedRemoval, isCloningRequired, isCollectionMapping, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isForeignReferenceMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJoiningSupported, isJPAId, isLazy, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isOwned, isPrimaryKeyMapping, isPrivateOwned, isReadOnly, isReferenceMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, iterateOnRealAttributeValue, performDataModificationEvent, postCalculateChanges, postCalculateChangesOnDeleted, postInitializeSourceAndTargetExpressions, preInitialize, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readOnly, readWrite, recordPrivateOwnedRemovals, remotelyInitialized, replaceValueHoldersIn, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsCacheable, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setRealAttributeValueInObject, setSetMethodName, setWeight, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, toString, updateCollectionChangeRecord, validateAfterInitialization, validateBeforeInitialization, valueFromResultSet, valueFromRow, valueFromRow, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForWhereClause
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.mappings.EmbeddableMapping
getAttributeName
-
Methods inherited from interface org.eclipse.persistence.mappings.foundation.MapKeyMapping
getReferenceDescriptor
-
-
-
-
Field Detail
-
isNullAllowed
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). To change this behavior, set the value of this variable to false. Then the mapping will build a new instance of the aggregate object that is filled with nulls and place it in the source object.
-
aggregateKeyTable
protected org.eclipse.persistence.internal.helper.DatabaseTable aggregateKeyTable
-
aggregateToSourceFields
protected java.util.Map<java.lang.String,org.eclipse.persistence.internal.helper.DatabaseField> aggregateToSourceFields
322233 - changed to store the source DatabaseField to hold Case and other colunm info
-
nestedFieldTranslations
protected java.util.Map<java.lang.String,java.lang.Object[]> nestedFieldTranslations
Map of nested attributes that need to apply an override name to their a nested aggregate mapping's database field. Aggregate to source fields map is the existing EclipseLink functionality and works well when all embeddable mappings have unique database fields. This map adds specific attribute to database field override.
-
overrideManyToManyMappings
protected java.util.List<ManyToManyMapping> overrideManyToManyMappings
List of many to many mapping overrides to apply at initialize time to their cloned aggregate mappings.
-
overrideUnidirectionalOneToManyMappings
protected java.util.List<UnidirectionalOneToManyMapping> overrideUnidirectionalOneToManyMappings
List of unidirectional one to many mapping overrides to apply at initialize time to their cloned aggregate mappings.
-
converters
protected java.util.Map<java.lang.String,Converter> converters
List of converters to apply at initialize time to their cloned aggregate mappings.
-
mapsIdMappings
protected java.util.List<DatabaseMapping> mapsIdMappings
List of maps id mappings that need to be set to read only at initialize time on their cloned aggregate mappings.
-
-
Method Detail
-
isRelationalMapping
public boolean isRelationalMapping()
INTERNAL:- Overrides:
isRelationalMappingin classDatabaseMapping
-
addAdditionalFieldsToQuery
public void addAdditionalFieldsToQuery(ReadQuery selectionQuery, Expression baseExpression)
INTERNAL: Used when initializing queries for mappings that use a Map Called when the selection query is being initialized to add the fields for the map key to the query- Specified by:
addAdditionalFieldsToQueryin interfaceMapKeyMapping
-
addConverter
public void addConverter(Converter converter, java.lang.String attributeName)
Add a converter to be applied to a mapping of the aggregate descriptor.- Specified by:
addConverterin interfaceEmbeddableMapping
-
addFieldsForMapKey
public void addFieldsForMapKey(org.eclipse.persistence.internal.sessions.AbstractRecord joinRow)
INTERNAL: Used when initializing queries for mappings that use a Map Called when the insert query is being initialized to ensure the fields for the map key are in the insert query- Specified by:
addFieldsForMapKeyin interfaceMapKeyMapping
-
addFieldNameTranslation
public void addFieldNameTranslation(java.lang.String sourceFieldName, java.lang.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.
-
addFieldTranslation
public void addFieldTranslation(org.eclipse.persistence.internal.helper.DatabaseField sourceField, java.lang.String aggregateFieldName)PUBLIC: Add a field translation that maps from a field in the source table to a field name in the aggregate descriptor.- Specified by:
addFieldTranslationin interfaceEmbeddableMapping
-
addMapsIdMapping
public void addMapsIdMapping(DatabaseMapping mapping)
INTERNAL: In JPA users may specify a maps id mapping on a shared embeddable descriptor. These mappings need to be set to read-only at initialize time, after the reference descriptor is cloned.
-
addNestedFieldTranslation
public void addNestedFieldTranslation(java.lang.String attributeName, org.eclipse.persistence.internal.helper.DatabaseField sourceField, java.lang.String aggregateFieldName)INTERNAL: Add a nested field translation that maps from a field in the source table to a field name in a nested aggregate descriptor. These are handled slightly different that regular field translations in that they are unique based on the attribute name. It solves the case where multiple nested embeddables have mappings to similarly named default columns.- Specified by:
addNestedFieldTranslationin interfaceEmbeddableMapping
-
addOverrideManyToManyMapping
public void addOverrideManyToManyMapping(ManyToManyMapping mapping)
INTERNAL: In JPA users may specify overrides to apply to a many to many mapping on a shared embeddable descriptor. These settings are applied at initialize time, after the reference descriptor is cloned.- Specified by:
addOverrideManyToManyMappingin interfaceEmbeddableMapping
-
addOverrideUnidirectionalOneToManyMapping
public void addOverrideUnidirectionalOneToManyMapping(UnidirectionalOneToManyMapping mapping)
INTERNAL: In JPA users may specify overrides to apply to a unidirectional one to many mapping on a shared embeddable descriptor. These settings are applied at initialize time, after the reference descriptor is cloned.- Specified by:
addOverrideUnidirectionalOneToManyMappingin interfaceEmbeddableMapping
-
addKeyToDeletedObjectsList
public void addKeyToDeletedObjectsList(java.lang.Object object, java.util.Map deletedObjects)INTERNAL: For mappings used as MapKeys in MappedKeyContainerPolicy. Add the target of this mapping to the deleted objects list if necessary This method is used for removal of private owned relationships. AggregateObjectMappings are dealt with in their parent delete, so this is a no-op.- Specified by:
addKeyToDeletedObjectsListin interfaceMapKeyMapping- Parameters:
object-deletedObjects-
-
allAggregateFieldsAreNull
protected boolean allAggregateFieldsAreNull(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow)
INTERNAL: Return whether all the aggregate fields in the specified row are NULL.
-
allowNull
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). This behavior can be explicitly set by calling #allowNull(). To change this behavior, call #dontAllowNull(). Then the mapping will build a new instance of the aggregate object that is filled with nulls and place it in the source object. In either situation, when writing, the mapping will place a NULL in all the fields in the database row for the aggregate object. Note: Any aggregate that has a relationship mapping automatically does not allow null.
-
backupAttributeValueIsNull
protected boolean backupAttributeValueIsNull(WriteObjectQuery query)
INTERNAL: Return whether the query's backup object has an attribute value of null.
-
prepareNestedQuery
public ObjectBuildingQuery prepareNestedQuery(ObjectBuildingQuery sourceQuery)
INTERNAL: Clone and prepare the selection query as a nested batch read query. This is used for nested batch reading.
-
buildAggregateFromRow
public java.lang.Object buildAggregateFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object targetObject, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, boolean buildShallowOriginal, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean targetIsProtected) throws DatabaseExceptionINTERNAL: Build and return an aggregate object from the specified row. If a null value is allowed and all the appropriate fields in the row are NULL, return a null. If an aggregate is referenced by the target object, return it (maintain identity) Otherwise, simply create a new aggregate object and return it.- Throws:
DatabaseException
-
buildWrapperCacheKeyForAggregate
protected org.eclipse.persistence.internal.identitymaps.CacheKey buildWrapperCacheKeyForAggregate(org.eclipse.persistence.internal.identitymaps.CacheKey owningCacheKey, boolean targetIsProtected)INTERNAL: Wrap the aggregate represented by this mapping in a cachekey so it can be processed my methods down the stack.- Parameters:
owningCacheKey- - the cache key holding the object to extract the aggregate from- Returns:
-
writeNullReferenceRow
protected void writeNullReferenceRow(org.eclipse.persistence.internal.sessions.AbstractRecord record)
INTERNAL: Write null values for all aggregate fields into the parent row.
-
buildObjectJoinExpression
public Expression buildObjectJoinExpression(Expression expression, java.lang.Object value, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used to allow object level comparisons. In the case of an Aggregate which has no primary key must do an attribute by attribute comparison.- Overrides:
buildObjectJoinExpressionin classDatabaseMapping
-
buildObjectJoinExpression
public Expression buildObjectJoinExpression(Expression expression, Expression argument, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used to allow object level comparisons.- Overrides:
buildObjectJoinExpressionin classDatabaseMapping
-
writeToRowFromAggregate
protected void writeToRowFromAggregate(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorExceptionINTERNAL: Write the aggregate values into the parent row.- Throws:
DescriptorException
-
writeToRowFromAggregateForShallowInsert
protected void writeToRowFromAggregateForShallowInsert(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: Write the aggregate values into the parent row for shallow insert.- Throws:
DescriptorException
-
writeToRowFromAggregateForUpdateAfterShallowInsert
protected void writeToRowFromAggregateForUpdateAfterShallowInsert(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table) throws DescriptorExceptionINTERNAL: Write the aggregate values into the parent row for update after shallow insert.- Throws:
DescriptorException
-
writeToRowFromAggregateForUpdateBeforeShallowDelete
protected void writeToRowFromAggregateForUpdateBeforeShallowDelete(org.eclipse.persistence.internal.sessions.AbstractRecord record, java.lang.Object object, java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table) throws DescriptorExceptionINTERNAL: Write the aggregate values into the parent row for update before shallow delete.- Throws:
DescriptorException
-
writeToRowFromAggregateWithChangeRecord
protected void writeToRowFromAggregateWithChangeRecord(org.eclipse.persistence.internal.sessions.AbstractRecord record, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorExceptionINTERNAL: Build and return a database row built with the values from the specified attribute value.- Throws:
DescriptorException
-
writeToRowFromAggregateForUpdate
protected void writeToRowFromAggregateForUpdate(org.eclipse.persistence.internal.sessions.AbstractRecord record, WriteObjectQuery query, java.lang.Object attributeValue) throws DescriptorExceptionINTERNAL: Build and return a database row built with the changed values from the specified attribute value.- Throws:
DescriptorException
-
buildClone
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)INTERNAL: Clone the attribute from the original and assign it to the clone.- Overrides:
buildClonein classAggregateMapping
-
buildElementClone
public java.lang.Object buildElementClone(java.lang.Object attributeValue, java.lang.Object parent, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, java.lang.Integer refreshCascade, org.eclipse.persistence.internal.sessions.AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)INTERNAL: Build a clone of the given element in a unitOfWork- Specified by:
buildElementClonein interfaceMapKeyMapping- Parameters:
attributeValue-parent-parentCacheKey-refreshCascade-cloningSession-isExisting-isFromSharedCache-- Returns:
-
setChangeListener
public void setChangeListener(java.lang.Object clone, java.beans.PropertyChangeListener listener, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)INTERNAL: Set the change listener in the aggregate.- Overrides:
setChangeListenerin classDatabaseMapping
-
buildCloneFromRow
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, 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: A combination of readFromRowIntoObject and buildClone.buildClone assumes the attribute value exists on the original and can simply be copied.
readFromRowIntoObject assumes that one is building an original.
Both of the above assumptions are false in this method, and actually attempts to do both at the same time.
Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
- Overrides:
buildCloneFromRowin classAggregateMapping
-
buildShallowOriginalFromRow
public void buildShallowOriginalFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object original, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)INTERNAL: Builds a shallow original object. Only direct attributes and primary keys are populated. In this way the minimum original required for instantiating a working copy clone can be built without placing it in the shared cache (no concern over cycles).- Overrides:
buildShallowOriginalFromRowin classDatabaseMapping
-
buildSelectionQueryForDirectCollectionKeyMapping
public ReadQuery buildSelectionQueryForDirectCollectionKeyMapping(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
INTERNAL: Certain key mappings favor different types of selection query. Return the appropriate type of selectionQuery- Specified by:
buildSelectionQueryForDirectCollectionKeyMappingin interfaceMapKeyMapping- Returns:
-
buildTemplateInsertRow
protected org.eclipse.persistence.internal.sessions.AbstractRecord buildTemplateInsertRow(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Build and return a "template" database row with all the fields set to null.
-
cascadeDiscoverAndPersistUnregisteredNewObjects
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, boolean getAttributeValueFromObject, java.util.Set cascadeErrors)INTERNAL: Cascade discover and persist new objects during commit to the map key- Specified by:
cascadeDiscoverAndPersistUnregisteredNewObjectsin interfaceMapKeyMapping
-
cascadePerformRemoveIfRequired
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects, boolean getAttributeValueFromObject)INTERNAL: Cascade perform delete through mappings that require the cascade- Specified by:
cascadePerformRemoveIfRequiredin interfaceMapKeyMapping
-
cascadePerformRemoveIfRequired
public 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- Specified by:
cascadePerformRemoveIfRequiredin classDatabaseMapping
-
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired
public void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)INTERNAL: Cascade perform removal of orphaned private owned objects from the UnitOfWorkChangeSet- Overrides:
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequiredin classDatabaseMapping
-
cascadeRegisterNewIfRequired
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects, boolean getAttributeValueFromObject)INTERNAL: Cascade registerNew for Create through mappings that require the cascade- Specified by:
cascadeRegisterNewIfRequiredin interfaceMapKeyMapping
-
cascadeRegisterNewIfRequired
public 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- Specified by:
cascadeRegisterNewIfRequiredin classDatabaseMapping
-
clone
public java.lang.Object clone()
INTERNAL: Clone the aggregate to source field names. AggregateCollectionMapping needs each nested embedded mapping to have its own list of aggregate to source field names so that it can apply nested override names to shared aggregate object mappings.- Specified by:
clonein interfaceMapComponentMapping- Overrides:
clonein classDatabaseMapping
-
collectFields
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> collectFields()
INTERNAL: Return the fields handled by the mapping.- Overrides:
collectFieldsin classDatabaseMapping
-
getOrderByNormalizedExpressions
public java.util.List<Expression> getOrderByNormalizedExpressions(Expression base)
INTERNAL: Aggregate order by all their fields by default.- Overrides:
getOrderByNormalizedExpressionsin classDatabaseMapping
-
collectQueryParameters
public void collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> record)
INTERNAL: This method is used to store the FK fields that can be cached that correspond to noncacheable mappings the FK field values will be used to re-issue the query when cloning the shared cache entity- Overrides:
collectQueryParametersin classDatabaseMapping
-
convertClassNamesToClasses
public 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 used when converting a project that has been built with class names to a project with classes.- Overrides:
convertClassNamesToClassesin classAggregateMapping- Parameters:
classLoader-
-
createMapComponentFromRow
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)INTERNAL Called when a DatabaseMapping is used to map the key in a collection. Returns the key.- Specified by:
createMapComponentFromRowin interfaceMapComponentMapping
-
createSerializableMapKeyInfo
public java.lang.Object createSerializableMapKeyInfo(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Creates the Array of simple types used to recreate this map.- Specified by:
createSerializableMapKeyInfoin interfaceMapKeyMapping
-
createMapComponentsFromSerializableKeyInfo
public java.util.List<java.lang.Object> createMapComponentsFromSerializableKeyInfo(java.lang.Object[] keyInfo, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Create an instance of the Key object from the key information extracted from the map. This may return the value directly in case of a simple key or will be used as the FK to load a related entity.- Specified by:
createMapComponentsFromSerializableKeyInfoin interfaceMapKeyMapping
-
createStubbedMapComponentFromSerializableKeyInfo
public java.lang.Object createStubbedMapComponentFromSerializableKeyInfo(java.lang.Object keyInfo, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Create an instance of the Key object from the key information extracted from the map. This key object may be a shallow stub of the actual object if the key is an Entity type.- Specified by:
createStubbedMapComponentFromSerializableKeyInfoin interfaceMapKeyMapping
-
createMapComponentFromJoinedRow
public java.lang.Object createMapComponentFromJoinedRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger, 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 and a join query is executed. Returns the key.- Specified by:
createMapComponentFromJoinedRowin interfaceMapKeyMapping
-
createQueryKeyForMapKey
public QueryKey createQueryKeyForMapKey()
INTERNAL: Create a query key that links to the map key- Specified by:
createQueryKeyForMapKeyin interfaceMapKeyMapping- Returns:
-
deleteMapKey
public void deleteMapKey(java.lang.Object objectDeleted, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: For mappings used as MapKeys in MappedKeyContainerPolicy, Delete the passed object if necessary. This method is used for removal of private owned relationships. AggregateObjectMappings are dealt with in their parent delete, so this is a no-op.- Specified by:
deleteMapKeyin interfaceMapKeyMapping- Parameters:
objectDeleted-session-
-
dontAllowNull
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). This behavior can be explicitly set by calling #allowNull(). To change this behavior, call #dontAllowNull(). Then the mapping will build a new instance of the aggregate object that is filled with nulls and place it in the source object. In either situation, when writing, the mapping will place a NULL in all the fields in the database row for the aggregate object. Note: Any aggregate that has a relationship mapping automatically does not allow null.
-
earlyPreDelete
public void earlyPreDelete(DeleteObjectQuery query, java.lang.Object object)
INTERNAL: This method is called to update collection tables prior to commit.- Overrides:
earlyPreDeletein classDatabaseMapping
-
extractIdentityFieldsForQuery
public java.util.Map extractIdentityFieldsForQuery(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Extract the fields for the Map key from the object to use in a query.- Specified by:
extractIdentityFieldsForQueryin interfaceMapKeyMapping- Returns:
-
getAdditionalTablesForJoinQuery
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseTable> getAdditionalTablesForJoinQuery()
INTERNAL: Return any tables that will be required when this mapping is used as part of a join query- Specified by:
getAdditionalTablesForJoinQueryin interfaceMapKeyMapping- Returns:
-
getAdditionalSelectionCriteriaForMapKey
public Expression getAdditionalSelectionCriteriaForMapKey()
INTERNAL: Return the selection criteria necessary to select the target object when this mapping is a map key. AggregateObjectMappings do not need any additional selection criteria when they are map keys- Specified by:
getAdditionalSelectionCriteriaForMapKeyin interfaceMapKeyMapping- Returns:
-
getAggregateToSourceFieldAssociations
public java.util.Vector<Association> getAggregateToSourceFieldAssociations()
INTERNAL: Return a collection of the aggregate to source field associations.
-
getAggregateToSourceFields
public java.util.Map<java.lang.String,org.eclipse.persistence.internal.helper.DatabaseField> getAggregateToSourceFields()
INTERNAL: Return the hashtable that stores aggregate field name to source fields.
-
getNestedFieldTranslations
public java.util.Map<java.lang.String,java.lang.Object[]> getNestedFieldTranslations()
INTERNAL: Return the hashtable that stores the nested field translations.
-
getAttributeClassification
public java.lang.Class getAttributeClassification()
PUBLIC: The classification type for the attribute this mapping represents- Overrides:
getAttributeClassificationin classDatabaseMapping
-
getFieldClassification
public java.lang.Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
INTERNAL: Return the classification for the field contained in the mapping. This is used to convert the row value to a consistent Java value.- Overrides:
getFieldClassificationin classDatabaseMapping
-
getIdentityFieldsForMapKey
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getIdentityFieldsForMapKey()
INTERNAL: Return the fields that make up the identity of the mapped object. For mappings with a primary key, it will be the set of fields in the primary key. For mappings without a primary key it will likely be all the fields- Specified by:
getIdentityFieldsForMapKeyin interfaceMapKeyMapping- Returns:
-
getAllFieldsForMapKey
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getAllFieldsForMapKey()
INTERNAL: Get all the fields for the map key- Specified by:
getAllFieldsForMapKeyin interfaceMapKeyMapping
-
getForeignKeyFieldsForMapKey
public java.util.Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField> getForeignKeyFieldsForMapKey()
INTERNAL: Return a Map of any foreign keys defined within the the MapKey- Specified by:
getForeignKeyFieldsForMapKeyin interfaceMapKeyMapping- Returns:
-
getMatchingAttributeValueFromObject
protected java.lang.Object getMatchingAttributeValueFromObject(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object targetObject, org.eclipse.persistence.internal.sessions.AbstractSession session, ClassDescriptor descriptor)INTERNAL: This is used to preserve object identity during a refreshObject() query. Return the object corresponding to the specified database row. The default is to simply return the attribute value.
-
getMatchingBackupAttributeValue
protected java.lang.Object getMatchingBackupAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)
INTERNAL: This is used to match up objects during an update in a UOW. Return the object corresponding to the specified attribute value. The default is to simply return the backup attribute value.
-
getNestedJoinQuery
public ObjectLevelReadQuery getNestedJoinQuery(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectLevelReadQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Return the query that is used when this mapping is part of a joined relationship This method is used when this mapping is used to map the key in a Map- Specified by:
getNestedJoinQueryin interfaceMapKeyMapping- Returns:
-
getReferenceDescriptor
public ClassDescriptor getReferenceDescriptor(java.lang.Class theClass, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Since aggregate object mappings clone their descriptors, for inheritance the correct child clone must be found.- Overrides:
getReferenceDescriptorin classAggregateMapping
-
getReferenceFields
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getReferenceFields()
INTERNAL: Return the fields used to build the aggregate object.
-
getTargetVersionOfSourceObject
public java.lang.Object getTargetVersionOfSourceObject(java.lang.Object object, java.lang.Object parent, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)INTERNAL: If required, get the targetVersion of the source object from the merge manager. Used with MapKeyContainerPolicy to abstract getting the target version of a source key- Specified by:
getTargetVersionOfSourceObjectin interfaceMapKeyMapping- Returns:
-
getMapKeyTargetType
public java.lang.Object getMapKeyTargetType()
INTERNAL: Return the class this key mapping maps or the descriptor for it- Specified by:
getMapKeyTargetTypein interfaceMapKeyMapping- Returns:
-
hasDependency
public boolean hasDependency()
INTERNAL: Return if the mapping has any ownership or other dependency over its target object(s).- Overrides:
hasDependencyin classDatabaseMapping
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: For an aggregate mapping the reference descriptor is cloned. The cloned descriptor is then assigned primary keys and table names before initialize. Once the cloned descriptor is initialized it is assigned as reference descriptor in the aggregate mapping. This is a very specific behavior for aggregate mappings. The original descriptor is used only for creating clones and after that the aggregate mapping never uses it. Some initialization is done in postInitialize to ensure the target descriptor's references are initialized.- Overrides:
initializein classAggregateMapping- Throws:
DescriptorException
-
initializeChildInheritance
public void initializeChildInheritance(ClassDescriptor parentDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
INTERNAL: For an aggregate mapping the reference descriptor is cloned. If the reference descriptor is involved in an inheritance tree, all the parent and child descriptors are cloned also. The cloned descriptors are then assigned primary keys and table names before initialize. This is a very specific behavior for aggregate mappings.- Throws:
DescriptorException
-
initializeParentInheritance
public void initializeParentInheritance(ClassDescriptor parentDescriptor, ClassDescriptor childDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
INTERNAL: For an aggregate mapping the reference descriptor is cloned. If the reference descriptor is involved in an inheritance tree, all the parent and child descriptors are cloned also. The cloned descriptors are then assigned primary keys and table names before initialize. This is a very specific behavior for aggregate mappings.- Throws:
DescriptorException
-
initializeReferenceDescriptor
protected void initializeReferenceDescriptor(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the cloned reference descriptor with table names and primary keys
-
iterateOnMapKey
public void iterateOnMapKey(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object element)INTERNAL: Called when iterating through descriptors to handle iteration on this mapping when it is used as a MapKey- Specified by:
iterateOnMapKeyin interfaceMapKeyMapping- Parameters:
iterator-element-
-
isLockableMapping
public boolean isLockableMapping()
INTERNAL: Return whether this mapping should be traversed when we are locking- Overrides:
isLockableMappingin classDatabaseMapping- Returns:
-
isAggregateObjectMapping
public boolean isAggregateObjectMapping()
INTERNAL: Related mapping should implement this method to return true.- Overrides:
isAggregateObjectMappingin classDatabaseMapping
-
isChangeTrackingSupported
public boolean isChangeTrackingSupported(Project project)
INTERNAL: Return if this mapping supports change tracking.- Overrides:
isChangeTrackingSupportedin classDatabaseMapping
-
isCascadedLockingSupported
public boolean isCascadedLockingSupported()
INTERNAL Return true if this mapping supports cascaded version optimistic locking.- Overrides:
isCascadedLockingSupportedin classDatabaseMapping
-
isJPAIdNested
public boolean isJPAIdNested(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Flags that either this mapping or nested mapping is a JPA id mapping.
-
isNullAllowed
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). To change this behavior, set the value of this variable to false. Then the mapping will build a new instance of the aggregate object that is filled with nulls and place it in the source object. Note: Any aggregate that has a relationship mapping automatically does not allow null.
-
postInitialize
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: For an aggregate mapping the reference descriptor is cloned. The cloned descriptor is then assigned primary keys and table names before initialize. Once the cloned descriptor is initialized it is assigned as reference descriptor in the aggregate mapping. This is a very specific behavior for aggregate mappings. The original descriptor is used only for creating clones and after that the aggregate mapping never uses it. Some initialization is done in postInitialize to ensure the target descriptor's references are initialized.- Overrides:
postInitializein classDatabaseMapping- Throws:
DescriptorException
-
preinitializeMapKey
public void preinitializeMapKey(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL: Making any mapping changes necessary to use a the mapping as a map key prior to initializing the mapping- Specified by:
preinitializeMapKeyin interfaceMapKeyMapping
-
postInitializeMapKey
public void postInitializeMapKey(org.eclipse.persistence.internal.queries.MappedKeyMapContainerPolicy policy)
INTERNAL: Making any mapping changes necessary to use a the mapping as a map key after initializing the mapping.- Specified by:
postInitializeMapKeyin interfaceMapKeyMapping
-
readFromReturnRowIntoObject
public java.lang.Object readFromReturnRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object targetObject, ReadObjectQuery query, java.util.Collection handledMappings, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet) throws DatabaseExceptionINTERNAL: Build an aggregate object from the specified return row and put it in the specified target object. Return row is merged into object after execution of insert or update call according to ReturningPolicy. If not null changeSet must correspond to targetObject. changeSet is updated with all of the field values in the row.- Throws:
DatabaseException
-
readFromRowIntoObject
public java.lang.Object readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object targetObject, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected) throws DatabaseExceptionINTERNAL: Build an aggregate object from the specified row and put it in the specified target object.- Overrides:
readFromRowIntoObjectin classDatabaseMapping- Throws:
DatabaseException
-
rehashFieldDependancies
public void rehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Rehash any hashtables based on fields. This is used to clone descriptors for aggregates, which hammer field names.- Overrides:
rehashFieldDependanciesin classDatabaseMapping
-
requiresDataModificationEventsForMapKey
public boolean requiresDataModificationEventsForMapKey()
INTERNAL: Return whether this mapping requires extra queries to update the rows if it is used as a key in a map. This will typically be true if there are any parts to this mapping that are not read-only.- Specified by:
requiresDataModificationEventsForMapKeyin interfaceMapKeyMapping
-
setAggregateToSourceFieldAssociations
public void setAggregateToSourceFieldAssociations(java.util.Vector<Association> fieldAssociations)
INTERNAL: Set a collection of the aggregate to source field name associations.
-
setAggregateToSourceFields
public void setAggregateToSourceFields(java.util.Map<java.lang.String,org.eclipse.persistence.internal.helper.DatabaseField> aggregateToSource)
INTERNAL: Set the hashtable that stores target field name to the source field name.
-
setNestedFieldTranslations
public void setNestedFieldTranslations(java.util.Map<java.lang.String,java.lang.Object[]> fieldTranslations)
INTERNAL: Set the hashtable that stores a field in the source table to a field name in a nested aggregate descriptor.
-
setIsNullAllowed
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). To change this behavior, set the value of this variable to false. Then the mapping will build a new instance of the aggregate object that is filled with nulls and place it in the source object. Note: Any aggregate that has a relationship mapping automatically does not allow null.
-
setTableForAggregateMappingKey
public void setTableForAggregateMappingKey(org.eclipse.persistence.internal.helper.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. Set this table.
-
translateField
protected void translateField(org.eclipse.persistence.internal.helper.DatabaseField sourceField, org.eclipse.persistence.internal.helper.DatabaseField mappingField, ClassDescriptor clonedDescriptor)INTERNAL: Apply the field translation from the sourceField to the mappingField.
-
translateNestedFields
protected void translateNestedFields(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: If field names are different in the source and aggregate objects then the translation is done here. The aggregate field name is converted to source field name from the field name mappings stored.
-
translateFields
protected void translateFields(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: If field names are different in the source and aggregate objects then the translation is done here. The aggregate field name is converted to source field name from the field name mappings stored.
-
unwrapKey
public java.lang.Object unwrapKey(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Allow the key mapping to unwrap the object.- Specified by:
unwrapKeyin interfaceMapKeyMapping- Returns:
-
wrapKey
public java.lang.Object wrapKey(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Allow the key mapping to wrap the object.- Specified by:
wrapKeyin interfaceMapKeyMapping- Returns:
-
writeFromAttributeIntoRow
public void writeFromAttributeIntoRow(java.lang.Object attribute, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: A subclass should implement this method if it wants different behavior. Write the foreign key values from the attribute to the row.- Overrides:
writeFromAttributeIntoRowin classDatabaseMapping
-
valueFromObject
public java.lang.Object valueFromObject(java.lang.Object object, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorExceptionINTERNAL: Extract value of the field from the object- Overrides:
valueFromObjectin classDatabaseMapping- Throws:
DescriptorException
-
writeFromObjectIntoRow
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorExceptionINTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.- Overrides:
writeFromObjectIntoRowin classDatabaseMapping- Throws:
DescriptorException
-
writeFromObjectIntoRowForShallowInsert
public void writeFromObjectIntoRowForShallowInsert(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: This row is built for shallow insert which happens in case of bidirectional inserts.- Overrides:
writeFromObjectIntoRowForShallowInsertin classDatabaseMapping
-
writeFromObjectIntoRowForUpdateAfterShallowInsert
public void writeFromObjectIntoRowForUpdateAfterShallowInsert(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: This row is built for update after shallow insert which happens in case of bidirectional inserts. It contains the foreign keys with non null values that were set to null for shallow insert.- Overrides:
writeFromObjectIntoRowForUpdateAfterShallowInsertin classDatabaseMapping
-
writeFromObjectIntoRowForUpdateBeforeShallowDelete
public void writeFromObjectIntoRowForUpdateBeforeShallowDelete(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.helper.DatabaseTable table)INTERNAL: This row is built for update before shallow delete which happens in case of bidirectional inserts. It contains the same fields as the row built by writeFromObjectIntoRowForUpdateAfterShallowInsert, but all the values are null.- Overrides:
writeFromObjectIntoRowForUpdateBeforeShallowDeletein classDatabaseMapping
-
writeFromObjectIntoRowWithChangeRecord
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseMapping.WriteType writeType) throws DescriptorExceptionINTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row.- Overrides:
writeFromObjectIntoRowWithChangeRecordin classDatabaseMapping- Throws:
DescriptorException
-
writeFromObjectIntoRowForUpdate
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow) throws DescriptorException
INTERNAL: Get the attribute value from the object and add the changed values to the specified database row.- Overrides:
writeFromObjectIntoRowForUpdatein classDatabaseMapping- Throws:
DescriptorException
-
writeInsertFieldsIntoRow
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Write fields needed for insert into the template for with null values.- Overrides:
writeInsertFieldsIntoRowin classDatabaseMapping
-
writeUpdateFieldsIntoRow
public void writeUpdateFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)Description copied from class:DatabaseMappingINTERNAL: Write fields needed for update into the template for with null values. By default inserted fields are used.- Overrides:
writeUpdateFieldsIntoRowin classDatabaseMapping
-
addPrimaryKeyJoinField
public void addPrimaryKeyJoinField(org.eclipse.persistence.internal.helper.DatabaseField primaryKeyField, org.eclipse.persistence.internal.helper.DatabaseField secondaryField)INTERNAL: Add a primary key join column (secondary field). If this contain primary keys and the descriptor(or its subclass) has multiple tables (secondary tables or joined inheritance strategy), this should also know the primary key join columns to handle some cases properly.
-
-