|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.mappings.DatabaseMapping org.eclipse.persistence.mappings.AggregateMapping org.eclipse.persistence.mappings.AggregateObjectMapping
public class AggregateObjectMapping
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.
Field Summary | |
---|---|
protected org.eclipse.persistence.internal.helper.DatabaseTable |
aggregateKeyTable
|
protected java.util.Map<java.lang.String,java.lang.String> |
aggregateToSourceFieldNames
Map the name of a field in the aggregate descriptor to a field in the source table. |
protected boolean |
isNullAllowed
If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
protected java.util.List<ManyToManyMapping> |
overrideManyToManyMappings
List of many to many mapping overrides to apply at initialize time to their cloned aggregate mappings. |
protected java.util.List<UnidirectionalOneToManyMapping> |
overrideUnidirectionalOneToManyMappings
List 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 |
---|
referenceClass, referenceClassName, referenceDescriptor |
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping |
---|
attributeAccessor, attributeName, descriptor, fields, isDerivedIdMapping, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mappedByIdValue, NO_FIELDS, NO_WEIGHT, properties, weight, WEIGHT_1 |
Constructor Summary | |
---|---|
AggregateObjectMapping()
Default constructor. |
Method Summary | |
---|---|
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 |
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. |
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 |
void |
addKeyToDeletedObjectsList(java.lang.Object object,
java.util.Map deletedObjects)
INTERNAL: For mappings used as MapKeys in MappedKeyContainerPolicy. |
void |
addNestedFieldNameTranslation(java.lang.String attributeName,
java.lang.String sourceFieldName,
java.lang.String aggregateFieldName)
INTERNAL: Add a nested field name translation that maps from a field name in the source table to a field name in a nested aggregate descriptor. |
void |
addOverrideManyToManyMapping(ManyToManyMapping mapping)
INTERNAL: In JPA users may specify overrides to apply to a many to many mapping on a shared embeddable descriptor. |
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. |
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). |
protected boolean |
allAggregateFieldsAreNull(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow)
INTERNAL: Return whether all the aggregate fields in the specified row are NULL. |
void |
allowNull()
PUBLIC: If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink 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. |
java.lang.Object |
buildAggregateFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
java.lang.Object targetObject,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
boolean buildShallowOriginal,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: Build and return an aggregate object from the specified row. |
void |
buildClone(java.lang.Object original,
java.lang.Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
INTERNAL: Clone the attribute from the original and assign it to the clone. |
void |
buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object clone,
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.Object |
buildElementClone(java.lang.Object attributeValue,
java.lang.Object parent,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
boolean isExisting)
INTERNAL: Build a clone of the given element in a unitOfWork |
Expression |
buildObjectJoinExpression(Expression expression,
Expression argument,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used to allow object level comparisons. |
Expression |
buildObjectJoinExpression(Expression expression,
java.lang.Object value,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Used to allow object level comparisons. |
ReadQuery |
buildSelectionQueryForDirectCollectionKeyMapping(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
INTERNAL: Certain key mappings favor different types of selection query. |
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. |
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. |
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)
INTERNAL: Cascade discover and persist new objects during commit to the map key |
void |
cascadePerformRemoveIfRequired(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map visitedObjects)
INTERNAL: Cascade perform delete through mappings that require the cascade |
void |
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 |
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 |
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 |
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 |
java.lang.Object |
clone()
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. |
java.lang.Object |
createMapComponentFromJoinedRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManger,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL Called when a DatabaseMapping is used to map the key in a collection and a join query is executed. |
java.lang.Object |
createMapComponentFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow,
ObjectBuildingQuery query,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL Called when a DatabaseMapping is used to map the key in a collection. |
QueryKey |
createQueryKeyForMapKey()
INTERNAL: Create a query key that links to the map key |
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. |
void |
dontAllowNull()
PUBLIC: If all the fields in the database row for the aggregate object are NULL, then, by default, TopLink will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). |
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 |
Expression |
getAdditionalSelectionCriteriaForMapKey()
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 query |
java.util.Vector<Association> |
getAggregateToSourceFieldNameAssociations()
INTERNAL: Return a collection of the aggregate to source field name associations. |
java.util.Map<java.lang.String,java.lang.String> |
getAggregateToSourceFieldNames()
INTERNAL: Return the hashtable that stores aggregate field name to source field name. |
java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> |
getAllFieldsForMapKey()
INTERNAL: Get all the fields for the map key |
java.lang.Class |
getFieldClassification(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 MapKey |
java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> |
getIdentityFieldsForMapKey()
INTERNAL: Return the fields that make up the identity of the mapped object. |
java.lang.Object |
getMapKeyTargetType()
INTERNAL: Return the class this key mapping maps or the descriptor for it |
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. |
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. |
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 |
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. |
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
getReferenceFields()
INTERNAL: Return the fields used to build the aggregate object. |
java.lang.Object |
getTargetVersionOfSourceObject(java.lang.Object object,
java.lang.Object parent,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
INTERNAL: If required, get the targetVersion of the source object from the merge manager. |
boolean |
hasDependency()
INTERNAL: Return if the mapping has any ownership or other dependency over its target object(s). |
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: For an aggregate mapping the reference descriptor is cloned. |
void |
initializeChildInheritance(ClassDescriptor parentDescriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: For an aggregate mapping the reference descriptor is cloned. |
void |
initializeParentInheritance(ClassDescriptor parentDescriptor,
ClassDescriptor childDescriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: For an aggregate mapping the reference descriptor is cloned. |
protected void |
initializeReferenceDescriptor(ClassDescriptor clonedDescriptor)
INTERNAL: Initialize the cloned reference descriptor with table names and primary keys |
boolean |
isAggregateObjectMapping()
INTERNAL: Related mapping should implement this method to return true. |
boolean |
isCascadedLockingSupported()
INTERNAL Return true if this mapping supports cascaded version optimistic locking. |
boolean |
isChangeTrackingSupported(Project project)
INTERNAL: Return if this mapping supports change tracking. |
boolean |
isLockableMapping()
INTERNAL: Return whether this mapping should be traversed when we are locking |
boolean |
isNullAllowed()
INTERNAL: Return setting. |
boolean |
isRelationalMapping()
INTERNAL: |
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 |
void |
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: For an aggregate mapping the reference descriptor is cloned. |
void |
postInitializeMapValueSelectionQuery(ReadQuery selectionQuery,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow the selectionQuery to be modified when this MapComponentMapping is used as the value in a Map |
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 |
java.lang.Object |
readFromReturnRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord row,
java.lang.Object targetObject,
ReadObjectQuery query,
java.util.Collection handledMappings)
INTERNAL: Build an aggregate object from the specified return row and put it in the specified target object. |
java.lang.Object |
readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
java.lang.Object targetObject,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
INTERNAL: Build an aggregate object from the specified row and put it in the specified target object. |
void |
rehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Rehash any hashtables based on fields. |
void |
setAggregateToSourceFieldNameAssociations(java.util.Vector<Association> fieldAssociations)
INTERNAL: Set a collection of the aggregate to source field name associations. |
protected void |
setAggregateToSourceFieldNames(java.util.Map<java.lang.String,java.lang.String> aggregateToSource)
INTERNAL: Set the hashtable that stores target field name to the source field name. |
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. |
void |
setIsNullAllowed(boolean aBoolean)
INTERNAL: Will be used by Gromit only. |
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. |
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. |
java.lang.Object |
unwrapKey(java.lang.Object key,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow the key mapping to unwrap the object |
java.lang.Object |
valueFromObject(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 object |
java.lang.Object |
wrapKey(java.lang.Object key,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Allow the key mapping to wrap the object |
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. |
void |
writeFromObjectIntoRow(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row. |
void |
writeFromObjectIntoRowForUpdate(WriteObjectQuery 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. |
void |
writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Get the attribute value from the object and add the appropriate values to the specified database row. |
void |
writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Write fields needed for insert into the template for with null values. |
protected void |
writeNullReferenceRow(org.eclipse.persistence.internal.sessions.AbstractRecord record)
INTERNAL: Write null values for all aggregate fields into the parent row. |
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)
INTERNAL: Write the aggregate values into the parent row. |
protected void |
writeToRowFromAggregateForUpdate(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 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)
INTERNAL: Build and return a database row built with the values from the specified attribute value. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.persistence.mappings.foundation.MapKeyMapping |
---|
getReferenceDescriptor |
Methods inherited from interface org.eclipse.persistence.mappings.EmbeddableMapping |
---|
getAttributeName |
Field Detail |
---|
protected boolean isNullAllowed
protected org.eclipse.persistence.internal.helper.DatabaseTable aggregateKeyTable
protected transient java.util.Map<java.lang.String,java.lang.String> aggregateToSourceFieldNames
protected transient java.util.List<ManyToManyMapping> overrideManyToManyMappings
protected transient java.util.List<UnidirectionalOneToManyMapping> overrideUnidirectionalOneToManyMappings
Constructor Detail |
---|
public AggregateObjectMapping()
Method Detail |
---|
public boolean isRelationalMapping()
isRelationalMapping
in class DatabaseMapping
public void addAdditionalFieldsToQuery(ReadQuery selectionQuery, Expression baseExpression)
addAdditionalFieldsToQuery
in interface MapKeyMapping
public void addFieldsForMapKey(org.eclipse.persistence.internal.sessions.AbstractRecord joinRow)
addFieldsForMapKey
in interface MapKeyMapping
public void addFieldNameTranslation(java.lang.String sourceFieldName, java.lang.String aggregateFieldName)
addFieldNameTranslation
in interface EmbeddableMapping
public void addNestedFieldNameTranslation(java.lang.String attributeName, java.lang.String sourceFieldName, java.lang.String aggregateFieldName)
addNestedFieldNameTranslation
in interface EmbeddableMapping
addFieldNameTranslation
public void addOverrideManyToManyMapping(ManyToManyMapping mapping)
addOverrideManyToManyMapping
in interface EmbeddableMapping
public void addOverrideUnidirectionalOneToManyMapping(UnidirectionalOneToManyMapping mapping)
addOverrideUnidirectionalOneToManyMapping
in interface EmbeddableMapping
public void addKeyToDeletedObjectsList(java.lang.Object object, java.util.Map deletedObjects)
addKeyToDeletedObjectsList
in interface MapKeyMapping
object
- manager
- protected boolean allAggregateFieldsAreNull(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow)
public void allowNull()
protected boolean backupAttributeValueIsNull(WriteObjectQuery query)
public java.lang.Object buildAggregateFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object targetObject, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, boolean buildShallowOriginal, org.eclipse.persistence.internal.sessions.AbstractSession executionSession) throws DatabaseException
DatabaseException
protected void writeNullReferenceRow(org.eclipse.persistence.internal.sessions.AbstractRecord record)
public Expression buildObjectJoinExpression(Expression expression, java.lang.Object value, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildObjectJoinExpression
in class DatabaseMapping
public Expression buildObjectJoinExpression(Expression expression, Expression argument, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildObjectJoinExpression
in class DatabaseMapping
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) throws DescriptorException
DescriptorException
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) throws DescriptorException
DescriptorException
protected void writeToRowFromAggregateForUpdate(org.eclipse.persistence.internal.sessions.AbstractRecord record, WriteObjectQuery query, java.lang.Object attributeValue) throws DescriptorException
DescriptorException
public void buildClone(java.lang.Object original, java.lang.Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
buildClone
in class AggregateMapping
public java.lang.Object buildElementClone(java.lang.Object attributeValue, java.lang.Object parent, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, boolean isExisting)
buildElementClone
in interface MapKeyMapping
element
- unitOfWork
- isExisting
-
public void setChangeListener(java.lang.Object clone, java.beans.PropertyChangeListener listener, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
setChangeListener
in class DatabaseMapping
public void buildCloneFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object clone, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, org.eclipse.persistence.internal.sessions.AbstractSession executionSession)
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.
buildCloneFromRow
in class AggregateMapping
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)
buildShallowOriginalFromRow
in class DatabaseMapping
public ReadQuery buildSelectionQueryForDirectCollectionKeyMapping(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
buildSelectionQueryForDirectCollectionKeyMapping
in interface MapKeyMapping
protected org.eclipse.persistence.internal.sessions.AbstractRecord buildTemplateInsertRow(org.eclipse.persistence.internal.sessions.AbstractSession session)
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)
cascadeDiscoverAndPersistUnregisteredNewObjects
in interface MapKeyMapping
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects, boolean getAttributeValueFromObject)
cascadePerformRemoveIfRequired
in interface MapKeyMapping
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemoveIfRequired
in class DatabaseMapping
public void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired
in class DatabaseMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects, boolean getAttributeValueFromObject)
cascadeRegisterNewIfRequired
in interface MapKeyMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadeRegisterNewIfRequired
in class DatabaseMapping
public java.lang.Object clone()
clone
in class DatabaseMapping
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> collectFields()
collectFields
in class DatabaseMapping
public java.lang.Object createMapComponentFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord dbRow, ObjectBuildingQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
createMapComponentFromRow
in interface MapComponentMapping
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.sessions.AbstractSession session)
createMapComponentFromJoinedRow
in interface MapKeyMapping
public QueryKey createQueryKeyForMapKey()
createQueryKeyForMapKey
in interface MapKeyMapping
public void deleteMapKey(java.lang.Object objectDeleted, org.eclipse.persistence.internal.sessions.AbstractSession session)
deleteMapKey
in interface MapKeyMapping
objectDeleted
- session
- public void dontAllowNull()
public java.util.Map extractIdentityFieldsForQuery(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
extractIdentityFieldsForQuery
in interface MapKeyMapping
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseTable> getAdditionalTablesForJoinQuery()
getAdditionalTablesForJoinQuery
in interface MapKeyMapping
public Expression getAdditionalSelectionCriteriaForMapKey()
getAdditionalSelectionCriteriaForMapKey
in interface MapKeyMapping
public java.util.Vector<Association> getAggregateToSourceFieldNameAssociations()
public java.util.Map<java.lang.String,java.lang.String> getAggregateToSourceFieldNames()
public java.lang.Class getFieldClassification(org.eclipse.persistence.internal.helper.DatabaseField fieldToClassify)
getFieldClassification
in class DatabaseMapping
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getIdentityFieldsForMapKey()
getIdentityFieldsForMapKey
in interface MapKeyMapping
public java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> getAllFieldsForMapKey()
getAllFieldsForMapKey
in interface MapKeyMapping
public java.util.Map<org.eclipse.persistence.internal.helper.DatabaseField,org.eclipse.persistence.internal.helper.DatabaseField> getForeignKeyFieldsForMapKey()
getForeignKeyFieldsForMapKey
in interface MapKeyMapping
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)
protected java.lang.Object getMatchingBackupAttributeValue(WriteObjectQuery query, java.lang.Object attributeValue)
public ObjectLevelReadQuery getNestedJoinQuery(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectLevelReadQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
getNestedJoinQuery
in interface MapKeyMapping
public ClassDescriptor getReferenceDescriptor(java.lang.Class theClass, org.eclipse.persistence.internal.sessions.AbstractSession session)
getReferenceDescriptor
in class AggregateMapping
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getReferenceFields()
public java.lang.Object getTargetVersionOfSourceObject(java.lang.Object object, java.lang.Object parent, org.eclipse.persistence.internal.sessions.MergeManager mergeManager)
getTargetVersionOfSourceObject
in interface MapKeyMapping
public java.lang.Object getMapKeyTargetType()
getMapKeyTargetType
in interface MapKeyMapping
public boolean hasDependency()
hasDependency
in class DatabaseMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class AggregateMapping
DescriptorException
public void initializeChildInheritance(ClassDescriptor parentDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public void initializeParentInheritance(ClassDescriptor parentDescriptor, ClassDescriptor childDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeReferenceDescriptor(ClassDescriptor clonedDescriptor)
public void iterateOnMapKey(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object element)
iterateOnMapKey
in interface MapKeyMapping
iterator
- element
- public boolean isLockableMapping()
isLockableMapping
in class DatabaseMapping
public boolean isAggregateObjectMapping()
isAggregateObjectMapping
in class DatabaseMapping
public boolean isChangeTrackingSupported(Project project)
isChangeTrackingSupported
in class DatabaseMapping
public boolean isCascadedLockingSupported()
isCascadedLockingSupported
in class DatabaseMapping
public boolean isNullAllowed()
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
postInitialize
in class DatabaseMapping
DescriptorException
public void preinitializeMapKey(org.eclipse.persistence.internal.helper.DatabaseTable table) throws DescriptorException
preinitializeMapKey
in interface MapKeyMapping
DescriptorException
public void postInitializeMapValueSelectionQuery(ReadQuery selectionQuery, org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.Object readFromReturnRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord row, java.lang.Object targetObject, ReadObjectQuery query, java.util.Collection handledMappings) throws DatabaseException
DatabaseException
public java.lang.Object readFromRowIntoObject(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, java.lang.Object targetObject, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.sessions.AbstractSession executionSession) throws DatabaseException
readFromRowIntoObject
in class DatabaseMapping
DatabaseException
public void rehashFieldDependancies(org.eclipse.persistence.internal.sessions.AbstractSession session)
rehashFieldDependancies
in class DatabaseMapping
public void setAggregateToSourceFieldNameAssociations(java.util.Vector<Association> fieldAssociations)
protected void setAggregateToSourceFieldNames(java.util.Map<java.lang.String,java.lang.String> aggregateToSource)
public void setIsNullAllowed(boolean aBoolean)
public void setTableForAggregateMappingKey(org.eclipse.persistence.internal.helper.DatabaseTable table)
protected void translateFields(ClassDescriptor clonedDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.lang.Object unwrapKey(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)
unwrapKey
in interface MapKeyMapping
key
- session
-
public java.lang.Object wrapKey(java.lang.Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)
wrapKey
in interface MapKeyMapping
key
- session
-
public void writeFromAttributeIntoRow(java.lang.Object attribute, org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeFromAttributeIntoRow
in class DatabaseMapping
public java.lang.Object valueFromObject(java.lang.Object object, org.eclipse.persistence.internal.helper.DatabaseField field, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
valueFromObject
in class DatabaseMapping
DescriptorException
public void writeFromObjectIntoRow(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
writeFromObjectIntoRow
in class DatabaseMapping
DescriptorException
public void writeFromObjectIntoRowWithChangeRecord(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
writeFromObjectIntoRowWithChangeRecord
in class DatabaseMapping
DescriptorException
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow) throws DescriptorException
writeFromObjectIntoRowForUpdate
in class DatabaseMapping
DescriptorException
public void writeInsertFieldsIntoRow(org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
writeInsertFieldsIntoRow
in class DatabaseMapping
public void addPrimaryKeyJoinField(org.eclipse.persistence.internal.helper.DatabaseField primaryKeyField, org.eclipse.persistence.internal.helper.DatabaseField secondaryField)
|
EclipseLink 1.2.0, build 'v20091016-r5565' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |