public class DirectCollectionMapping extends CollectionMapping implements RelationalMapping
Purpose: This mapping is used to store a collection of simple types (String, Number, Date, etc.) into a single table. The table must store the value and a foreign key to the source object. A converter can be used if the desired object type and the data type do not match.
Converter
,
ObjectTypeConverter
,
TypeConversionConverter
,
SerializedObjectConverter
,
Serialized FormDatabaseMapping.WriteType
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class |
attributeClassification |
protected java.lang.String |
attributeClassificationName |
protected ModifyQuery |
changeSetDeleteNullQuery |
protected ModifyQuery |
changeSetDeleteQuery
Used for deletion when ChangeSets are used
|
protected static java.lang.String |
Delete
Used for data modification events.
|
protected static java.lang.String |
DeleteAll |
protected static java.lang.String |
DeleteAtIndex |
protected ModifyQuery |
deleteAtIndexQuery
Used (only in case listOrderField !
|
protected org.eclipse.persistence.internal.helper.DatabaseField |
directField
The direct field name is converted and stored
|
protected boolean |
hasCustomDeleteAtIndexQuery |
protected boolean |
hasCustomDeleteQuery |
protected boolean |
hasCustomInsertQuery |
protected boolean |
hasCustomUpdateAtIndexQuery |
protected HistoryPolicy |
historyPolicy |
protected static java.lang.String |
Insert |
protected DataModifyQuery |
insertQuery
Used for insertion for m-m and dc, not used in 1-m.
|
protected java.util.List<Expression> |
orderByExpressions |
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
referenceKeyFields |
protected org.eclipse.persistence.internal.helper.DatabaseTable |
referenceTable
Stores the reference table
|
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
sourceKeyFields |
protected static java.lang.String |
UpdateAtIndex |
protected ModifyQuery |
updateAtIndexQuery
Used (only in case listOrderField !
|
protected Converter |
valueConverter
Allows user defined conversion between the object value and the database value.
|
protected java.lang.String |
valueConverterClassName |
changeOrderTargetQuery, containerPolicy, deleteAllQuery, hasCustomDeleteAllQuery, hasOrderBy, isListOrderFieldSupported, isSynchronizeOnMerge, listOrderField, mustDeleteReferenceObjectsOneByOne, orderCorrectionType
batchFetchType, cascadeDetach, cascadeMerge, cascadePersist, cascadeRefresh, cascadeRemove, forceInitializationOfSelectionCriteria, hasCustomSelectionQuery, indirectionPolicy, INNER_JOIN, isCascadeOnDeleteSetOnDatabase, isPrivateOwned, joinFetch, mappedBy, NONE, OUTER_JOIN, partitioningPolicy, partitioningPolicyName, QUERY_BATCH_PARAMETER, referenceClass, referenceClassName, referenceDescriptor, relationshipPartner, relationshipPartnerAttributeName, requiresTransientWeavedFields, selectionQuery, tempInitSession
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
Constructor and Description |
---|
DirectCollectionMapping()
PUBLIC:
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAscendingOrdering()
PUBLIC:
Provide ascending order support for this direct collection mapping.
|
void |
addDescendingOrdering()
PUBLIC:
Provide descending order support for this direct collection mapping.
|
void |
addOrdering(Expression expression)
ADVANCED:
Used this method to add custom ordering expressions when fetching
the collection.
|
void |
addReferenceKeyField(org.eclipse.persistence.internal.helper.DatabaseField referenceForeignKeyField,
org.eclipse.persistence.internal.helper.DatabaseField sourcePrimaryKeyField)
PUBLIC:
Add the reference key field.
|
void |
addReferenceKeyFieldName(java.lang.String referenceForeignKeyFieldName,
java.lang.String sourcePrimaryKeyFieldName)
PUBLIC:
Add the name of the reference key field.
|
protected Expression |
buildBatchCriteria(ExpressionBuilder builder,
ObjectLevelReadQuery query)
INTERNAL:
Return the selection criteria used to IN batch fetching.
|
void |
buildCopy(java.lang.Object copy,
java.lang.Object original,
CopyGroup group)
INTERNAL:
Copy of the attribute of the object.
|
java.lang.Object |
buildElementClone(java.lang.Object element,
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:
Clone the element, if necessary.
|
Expression |
buildExpression(java.lang.Object queryObject,
QueryByExamplePolicy policy,
Expression expressionBuilder,
java.util.Map processedObjects,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
In case Query By Example is used, this method builds and returns an expression that
corresponds to a single attribute and it's value.
|
protected void |
buildListOrderField()
INTERNAL:
Verifies listOrderField's table: it must be reference table.
|
void |
calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Used by AttributeLevelChangeTracking to update a changeRecord with calculated changes
as apposed to detected changes.
|
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,
java.util.Set cascadeErrors)
INTERNAL:
Cascade discover and persist new objects during commit.
|
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 |
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
|
java.lang.Object |
clone()
INTERNAL:
The mapping clones itself to create deep copy.
|
void |
collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> cacheFields)
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
|
void |
compareCollectionsForChange(java.lang.Object oldCollection,
java.lang.Object newCollection,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is used to calculate the differences between two collections.
|
org.eclipse.persistence.internal.sessions.ChangeRecord |
compareForChange(java.lang.Object clone,
java.lang.Object backUp,
org.eclipse.persistence.internal.sessions.ObjectChangeSet owner,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method compares the changes between two direct collections.
|
protected boolean |
compareLists(java.util.List firstList,
java.util.List secondList)
Compare two lists.
|
void |
compareListsForChange(java.util.List oldList,
java.util.List newList,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
This method is used to calculate the differences between two Lists.
|
boolean |
compareObjects(java.lang.Object firstObject,
java.lang.Object secondObject,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Compare the attributes belonging to this mapping for the objects.
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this mapping to actual class-based
settings
This method is implemented by subclasses as necessary.
|
protected Expression |
createWhereClauseForDeleteNullQuery(ExpressionBuilder builder) |
protected Expression |
createWhereClauseForDeleteQuery(ExpressionBuilder builder) |
protected void |
executeBatchQuery(DatabaseQuery query,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
java.util.Map referenceDataByKey,
org.eclipse.persistence.internal.sessions.AbstractSession session,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
INTERNAL:
Prepare and execute the batch query and store the
results for each source object in a map keyed by the
mappings source keys of the source objects.
|
protected java.lang.Object |
extractBatchKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Extract the primary key value from the source row.
|
protected java.lang.Object |
extractKeyFromTargetRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Extract the source primary key value from the reference direct row.
|
void |
fixRealObjectReferences(java.lang.Object object,
java.util.Map objectInformation,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
DistributedSession session)
INTERNAL:
At this point, we realize we don't have indirection;
so we need to replace the reference object(s) with
the corresponding object(s) from the remote session.
|
protected Expression |
getAdditionalFieldsBaseExpression(ReadQuery query)
INTERNAL:
Return the base expression to use for adding fields to the query.
|
java.lang.Class |
getAttributeClassification()
PUBLIC:
Some databases do not properly support all of the base data types.
|
java.lang.String |
getAttributeClassificationName()
INTERNAL:
Return the class name of the attribute type.
|
protected ModifyQuery |
getDeleteAtIndexQuery() |
protected ModifyQuery |
getDeleteNullQuery() |
protected ModifyQuery |
getDeleteQuery() |
org.eclipse.persistence.internal.helper.DatabaseField |
getDirectField()
INTERNAL:
Return the direct field.
|
java.lang.String |
getDirectFieldName()
PUBLIC:
Returns the name of the field name in the reference table.
|
java.util.Vector |
getFieldsForTranslationInAggregate()
INTERNAL:
Return source key fields for translation by an AggregateObjectMapping
|
java.lang.Object |
getFieldValue(java.lang.Object attributeValue,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Convert the attribute value to a field value.
|
HistoryPolicy |
getHistoryPolicy()
PUBLIC:
Allow history support on the reference table.
|
protected DataModifyQuery |
getInsertQuery() |
Expression |
getJoinCriteria(org.eclipse.persistence.internal.expressions.ObjectExpression context,
Expression base)
INTERNAL:
Returns the join criteria stored in the mapping selection query.
|
java.lang.Object |
getObjectCorrespondingTo(java.lang.Object object,
DistributedSession session,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query)
INTERNAL:
return the object on the client corresponding to the specified object.
|
java.util.List<Expression> |
getOrderByExpressions()
PUBLIC:
Return the order by expression.
|
java.util.List<Expression> |
getOrderByNormalizedExpressions(Expression base)
INTERNAL:
Return null if this mapping is used in an order by.
|
java.lang.Class |
getReferenceClass()
INTERNAL:
This cannot be used with direct collection mappings.
|
java.lang.String |
getReferenceClassName()
INTERNAL:
Returns the reference class name.
|
ClassDescriptor |
getReferenceDescriptor()
INTERNAL:
There is none on direct collection.
|
java.util.Vector |
getReferenceKeyFieldNames()
INTERNAL:
Return the reference key field names associated with the mapping.
|
java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
getReferenceKeyFields()
INTERNAL:
Return the reference key fields.
|
org.eclipse.persistence.internal.helper.DatabaseTable |
getReferenceTable()
INTERNAL:
Return the direct table.
|
java.lang.String |
getReferenceTableName()
PUBLIC:
Returns the name of the reference table
|
java.lang.String |
getReferenceTableQualifiedName()
PUBLIC:
Returns the qualified name of the reference table.
|
DatabaseMapping |
getRelationshipPartner()
INTERNAL:
Return the relationshipPartner mapping for this bi-directional mapping.
|
java.util.Vector |
getSelectFields()
INTERNAL:
Returns the set of fields that should be selected to build this mapping's value(s).
|
protected org.eclipse.persistence.internal.queries.ContainerPolicy |
getSelectionQueryContainerPolicy()
INTERNAL:
Get the container policy from the selection query for this mapping.
|
java.util.Vector |
getSelectTables()
INTERNAL:
Returns the table(s) that should be selected to build this mapping's value(s).
|
java.util.Vector |
getSourceKeyFieldNames()
PUBLIC:
Return the source key field names associated with the mapping.
|
java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> |
getSourceKeyFields()
INTERNAL:
Return the source key fields.
|
protected ModifyQuery |
getUpdateAtIndexQuery() |
Converter |
getValueConverter()
PUBLIC:
Return the converter on the mapping.
|
protected boolean |
hasCustomDeleteAtIndexQuery() |
protected boolean |
hasCustomDeleteQuery() |
protected boolean |
hasCustomInsertQuery() |
protected boolean |
hasCustomUpdateAtIndexQuery() |
boolean |
hasNestedIdentityReference()
INTERNAL:
Indicates whether the mapping (or at least one of its nested mappings, at any nested depth)
references an entity.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize and validate the mapping properties.
|
protected void |
initializeDeleteAllQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize delete all query.
|
protected void |
initializeDeleteAtIndexQuery(org.eclipse.persistence.internal.sessions.AbstractSession session) |
protected void |
initializeDeleteNullQuery(org.eclipse.persistence.internal.sessions.AbstractSession session) |
protected void |
initializeDeleteQuery(org.eclipse.persistence.internal.sessions.AbstractSession session) |
protected void |
initializeDirectField(org.eclipse.persistence.internal.sessions.AbstractSession session)
The field name on the reference table is initialized and cached.
|
protected void |
initializeInsertQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize insert query.
|
protected void |
initializeListOrderField(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initializes listOrderField.
|
protected void |
initializeReferenceDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session)
There is no reference descriptor
|
protected void |
initializeReferenceKeys(org.eclipse.persistence.internal.sessions.AbstractSession session)
The reference keys on the reference table are initialized
|
protected void |
initializeReferenceTable(org.eclipse.persistence.internal.sessions.AbstractSession session)
Set the table qualifier on the reference table if required
|
protected void |
initializeSelectionCriteria(org.eclipse.persistence.internal.sessions.AbstractSession session) |
protected void |
initializeSelectionQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
The selection query is initialized
|
protected void |
initializeSelectionStatement(org.eclipse.persistence.internal.sessions.AbstractSession session) |
protected void |
initializeSourceKeys(org.eclipse.persistence.internal.sessions.AbstractSession session)
The source keys are initialized
|
protected void |
initializeSourceKeysWithDefaults(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
If a user does not specify the source key then the primary keys of the source table are used.
|
protected void |
initializeUpdateAtIndexQuery(org.eclipse.persistence.internal.sessions.AbstractSession session) |
protected void |
initOrRebuildSelectQuery()
INTERNAL:
Used by DirectMapMapping to rebuild select query.
|
boolean |
isCandidateForPrivateOwnedRemoval()
INTERNAL:
DirectCollectionMapping contents should not be considered for addition to the UnitOfWork
private owned objects list for removal.
|
boolean |
isCascadedLockingSupported()
INTERNAL
Return true if this mapping supports cascaded version optimistic locking.
|
boolean |
isDirectCollectionMapping()
INTERNAL:
|
boolean |
isElementCollectionMapping()
INTERNAL:
|
boolean |
isJoiningSupported()
INTERNAL:
Return if this mapping support joining.
|
protected boolean |
isKeyForSourceSpecified()
INTERNAL:
Checks if source and target keys are mentioned by the user or not.
|
boolean |
isLockableMapping()
INTERNAL:
Return whether this mapping should be traversed when we are locking
|
boolean |
isOwned()
INTERNAL:
|
boolean |
isRelationalMapping()
INTERNAL:
All relational mappings should implement this method to return true.
|
void |
iterateOnElement(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
java.lang.Object element)
INTERNAL:
Iterate on the specified element.
|
void |
iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator,
java.lang.Object realAttributeValue)
INTERNAL:
Iterate on the attribute value.
|
protected void |
mergeAddRemoveChanges(java.lang.Object valueOfTarget,
java.lang.Object delegateTarget,
org.eclipse.persistence.internal.sessions.DirectCollectionChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Merge changes by adding and removing from the change record to the
target object, and its delegate object if instance of IndirectCollection.
|
void |
mergeChangesIntoObject(java.lang.Object target,
org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL:
Merge changes from the source to the target object.
|
void |
mergeIntoObject(java.lang.Object target,
boolean isTargetUnInitialized,
java.lang.Object source,
org.eclipse.persistence.internal.sessions.MergeManager mergeManager,
org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
INTERNAL:
Merge changes from the source to the target object.
|
void |
performDataModificationEvent(java.lang.Object[] event,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Perform the commit event.
|
void |
postCalculateChanges(ChangeRecord changeRecord,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Overridden by mappings that require additional processing of the change record after the record has been calculated.
|
void |
postInsert(WriteObjectQuery query)
INTERNAL:
Insert the private owned object.
|
void |
postUpdate(WriteObjectQuery writeQuery)
INTERNAL:
Update private owned part.
|
protected void |
postUpdateWithChangeSet(WriteObjectQuery writeQuery)
INTERNAL:
Update private owned part.
|
protected void |
postUpdateWithChangeSetListOrder(WriteObjectQuery writeQuery)
INTERNAL:
Update private owned part.
|
void |
preDelete(DeleteObjectQuery query)
INTERNAL:
Delete private owned part.
|
ReadQuery |
prepareNestedBatchQuery(ObjectLevelReadQuery query)
INTERNAL:
Clone and prepare the selection query as a nested batch read query.
|
ObjectLevelReadQuery |
prepareNestedJoins(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery baseQuery,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Clone and prepare the joined direct query.
|
protected void |
prepareTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
java.lang.Object object,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
The translation row may require additional fields than the primary key if the mapping in not on the primary key.
|
void |
recordPrivateOwnedRemovals(java.lang.Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Overridden by mappings that require additional processing of the change record after the record has been calculated.
|
void |
remoteInitialization(DistributedSession session)
INTERNAL:
Once descriptors are serialized to the remote session.
|
java.util.Map |
replaceValueHoldersIn(java.lang.Object object,
org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
INTERNAL:
replace the value holders in the specified reference object(s)
|
void |
setAttributeClassification(java.lang.Class attributeClassification)
PUBLIC:
Some databases do not properly support all of the base data types.
|
void |
setAttributeClassificationName(java.lang.String attributeClassificationName)
INTERNAL:
Set the name of the class for MW usage.
|
void |
setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
ADVANCED:
Configure the mapping to use a container policy.
|
void |
setCustomDeleteAtIndexQuery(ModifyQuery query)
PUBLIC:
The default delete by index query for this mapping can be overridden by specifying the new query.
|
void |
setCustomDeleteQuery(ModifyQuery query)
PUBLIC:
The default delete query for this mapping can be overridden by specifying the new query.
|
void |
setCustomInsertQuery(DataModifyQuery query)
PUBLIC:
The default insert query for mapping can be overridden by specifying the new query.
|
void |
setCustomUpdateAtIndexQuery(ModifyQuery query)
PUBLIC:
The default delete by index query for this mapping can be overridden by specifying the new query.
|
protected void |
setDeleteQuery(ModifyQuery query) |
void |
setDeleteSQLString(java.lang.String sqlString)
PUBLIC:
Set the receiver's delete SQL string.
|
void |
setDirectField(org.eclipse.persistence.internal.helper.DatabaseField field)
PUBLIC:
Set the direct field in the reference table.
|
void |
setDirectFieldClassification(java.lang.Class fieldType)
ADVANCED:
Set the class type of the field value.
|
void |
setDirectFieldClassificationName(java.lang.String className)
ADVANCED:
Set the class type of the field value.
|
void |
setDirectFieldName(java.lang.String fieldName)
PUBLIC:
Set the direct field name in the reference table.
|
protected void |
setHasCustomDeleteQuery(boolean bool) |
protected void |
setHasCustomInsertQuery(boolean bool) |
void |
setHistoryPolicy(HistoryPolicy policy)
PUBLIC:
Support history on the reference table.
|
protected void |
setInsertQuery(DataModifyQuery insertQuery) |
void |
setInsertSQLString(java.lang.String sqlString)
PUBLIC:
Set the receiver's insert SQL string.
|
void |
setReferenceClass(java.lang.Class referenceClass)
INTERNAL:
This cannot be used with direct collection mappings.
|
void |
setReferenceClassName(java.lang.String referenceClassName)
INTERNAL:
Used by MW.
|
void |
setReferenceKeyFieldName(java.lang.String fieldName)
PUBLIC:
Set the name of the reference key field.
|
void |
setReferenceKeyFieldNames(java.util.Vector fieldNames)
INTERNAL:
Set the reference key field names associated with the mapping.
|
void |
setReferenceKeyFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> aVector)
INTERNAL:
Set the reference fields.
|
void |
setReferenceTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
INTERNAL:
Set the reference table.
|
void |
setReferenceTableName(java.lang.String tableName)
PUBLIC:
Set the reference table name.
|
void |
setSelectionCriteria(Expression anExpression)
PUBLIC:
Sets the selection criteria to be used as a where clause to read
reference objects.
|
protected void |
setSelectionQueryContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
INTERNAL:
Set the container policy on the selection query for this mapping.
|
void |
setSessionName(java.lang.String name)
PUBLIC:
Set the name of the session to execute the mapping's queries under.
|
void |
setSourceKeyFieldNames(java.util.Vector fieldNames)
INTERNAL:
Set the source key field names associated with the mapping.
|
void |
setSourceKeyFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> sourceKeyFields)
INTERNAL:
Set the source fields.
|
void |
setValueConverter(Converter valueConverter)
PUBLIC:
Set the converter on the mapping.
|
void |
setValueConverterClassName(java.lang.String valueConverterClassName)
PUBLIC:
Set the converter class name on the mapping.
|
boolean |
shouldUseListOrderFieldTableExpression()
INTERNAL:
Indicates whether getListOrderFieldExpression method should create field expression on table expression.
|
protected void |
simpleAddToCollectionChangeRecord(java.lang.Object objectToAdd,
java.lang.Integer index,
boolean isSet,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean isChangeApplied) |
void |
simpleAddToCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object objectToAdd,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
ADVANCED:
This method is used to have an object add to a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
protected void |
simpleRemoveFromCollectionChangeRecord(java.lang.Object objectToRemove,
java.lang.Integer index,
boolean isSet,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean isChangeApplied) |
void |
simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey,
java.lang.Object objectToRemove,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.AbstractSession session)
ADVANCED:
This method is used to have an object removed from a collection once the changeSet is applied
The referenceKey parameter should only be used for direct Maps.
|
void |
updateChangeRecord(java.lang.Object clone,
java.lang.Object newValue,
java.lang.Object oldValue,
org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Either create a new change record or update with the new value.
|
void |
updateCollectionChangeRecord(CollectionChangeEvent event,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Add or removes a new value and its change set to the collection change record based on the event passed in.
|
void |
useMapClass(java.lang.Class concreteClass,
java.lang.String methodName)
PUBLIC:
It is illegal to use a Map as the container of a DirectCollectionMapping.
|
java.lang.Object |
valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean isTargetProtected,
java.lang.Boolean[] wasCacheUsed)
INTERNAL:
Return the value of the reference attribute or a value holder.
|
protected java.lang.Object |
valueFromRowInternalWithJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row,
org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager,
ObjectBuildingQuery sourceQuery,
org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey,
org.eclipse.persistence.internal.sessions.AbstractSession executionSession,
boolean isTargetProtected)
INTERNAL:
Return the value of the field from the row or a value holder on the query to obtain the object.
|
boolean |
verifyDelete(java.lang.Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Checks if object is deleted from the database or not.
|
addAggregateOrderBy, addAscendingOrdering, addDescendingOrdering, addOrderBy, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildElementUnitOfWorkClone, buildReferencesPKList, compareLists, compareListsAndWrite, compareObjectsAndWrite, compareObjectsWithoutPrivateOwned, compareObjectsWithPrivateOwned, copyElement, extractResultFromBatchQuery, getContainerPolicy, getDeleteAllQuery, getListOrderField, getOrderByQueryKeyExpressions, getOrderCorrectionType, getRealCollectionAttributeValueFromObject, getTargetPrimaryKeyFields, hasCustomDeleteAllQuery, hasOrderBy, initializeChangeOrderTargetQuery, initializeListOrderFieldTable, isAttributeValueInstantiatedOrChanged, isChangeTrackingSupported, isCollectionMapping, isListOrderFieldSupported, isMapKeyObjectRelationship, load, loadAll, mustDeleteReferenceObjectsOneByOne, objectAddedDuringUpdate, objectOrderChangedDuringUpdate, objectRemovedDuringUpdate, objectUnchangedDuringUpdate, objectUnchangedDuringUpdate, postDelete, postInitialize, postPrepareNestedBatchQuery, preInsert, preUpdate, readPrivateOwnedForObject, setChangeListener, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllQuery, setDeleteAllSQLString, setHasCustomDeleteAllQuery, setListOrderField, setListOrderFieldName, setMustDeleteReferenceObjectsOneByOne, setOrderCorrectionType, setUseLazyInstantiationForIndirectCollection, shouldUseLazyInstantiationForIndirectCollection, updateChangeRecordForSelfMerge, useCollectionClass, useCollectionClassName, useListClassName, useMapClass, useMapClassName, useSortedSetClass, useSortedSetClassName, useSortedSetClassName, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet, validateBeforeInitialization, valueFromPKList, writeChanges
addForeignKeyField, addTargetForeignKeyField, batchedValueFromRow, buildBackupClone, buildClone, buildCloneFromRow, checkCacheForBatchKey, createCloneValueHolder, dontDoMerge, dontUseBatchReading, dontUseIndirection, extendPessimisticLockScopeInSourceQuery, extendPessimisticLockScopeInTargetQuery, fixObjectReferences, getAttributeValueFromObject, getAttributeValueWithClonedValueHolders, getBatchFetchType, getExtendPessimisticLockScopeDedicatedQuery, getIndirectionPolicy, getJoinFetch, getMappedBy, getPartitioningPolicy, getPartitioningPolicyName, getRealAttributeValueFromAttribute, getRelationshipPartnerAttributeName, getSelectionCriteria, getSelectionQuery, getTempSession, getValueFromRemoteValueHolder, hasCustomSelectionQuery, hasDependency, instantiateAttribute, isAttributeValueFromObjectInstantiated, isAttributeValueFullyBuilt, isAttributeValueInstantiated, isCascadeDetach, isCascadeMerge, isCascadeOnDeleteSetOnDatabase, isCascadePersist, isCascadeRefresh, isCascadeRemove, isExtendingPessimisticLockScope, isForeignReferenceMapping, isInnerJoinFetched, isJoinFetched, isLazy, isOuterJoinFetched, isPrivateOwned, iterate, mergeRemoteValueHolder, preInitialize, prepareHistoricalQuery, prepareNestedJoinQueryClone, privateOwnedRelationship, readFromRowIntoObject, requiresTransientWeavedFields, setBatchFetchType, setCascadeAll, setCascadeDetach, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setForceInitializationOfSelectionCriteria, setHasCustomSelectionQuery, setIndirectionPolicy, setIsCacheable, setIsCascadeOnDeleteSetOnDatabase, setIsPrivateOwned, setJoinFetch, setMappedBy, setPartitioningPolicy, setPartitioningPolicyName, setRealAttributeValueInObject, setReferenceDescriptor, setRelationshipPartner, setRelationshipPartnerAttributeName, setRequiresTransientWeavedFields, setSelectionCall, setSelectionQuery, setSelectionSQLString, setShouldExtendPessimisticLockScope, setTempSession, setUsesBatchReading, setUsesIndirection, shouldExtendPessimisticLockScope, shouldExtendPessimisticLockScopeInDedicatedQuery, shouldExtendPessimisticLockScopeInSourceQuery, shouldExtendPessimisticLockScopeInTargetQuery, shouldForceInitializationOfSelectionCriteria, shouldInitializeSelectionCriteria, shouldMergeCascadeParts, shouldMergeCascadeReference, shouldObjectModifyCascadeToParts, shouldRefreshCascadeParts, shouldUseBatchReading, shouldUseValueFromRowWithJoin, trimRowForJoin, trimRowForJoin, useBasicIndirection, useBatchReading, useContainerIndirection, useInnerJoinFetch, useOuterJoinFetch, usesIndirection, useWeavedIndirection, valueFromRowInternal, valueFromRowInternal
addUnconvertedProperty, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, cloneFields, collectFields, convertConverterClassNamesToClasses, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, getAttributeAccessor, getAttributeName, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getProperties, getProperty, getRealAttributeValueFromObject, getSetMethodName, getUnconvertedProperties, getWeight, hasConstraintDependency, hasInverseConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCloningRequired, isDatabaseMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJPAId, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToManyMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isPrimaryKeyMapping, isReadOnly, isReferenceMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUnidirectionalOneToManyMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, postCalculateChangesOnDeleted, postInitializeSourceAndTargetExpressions, prepareCascadeLockingPolicy, readFromResultSetIntoObject, readOnly, readWrite, rehashFieldDependancies, remotelyInitialized, setAttributeAccessor, setAttributeName, setAttributeValueInObject, setDerivedIdMapping, setDerivesId, setDescriptor, setFields, setGetMethodName, setIsInAndOutSopObject, setIsInSopObject, setIsJPAId, setIsLazy, setIsMapKeyMapping, setIsOptional, setIsOutSopObject, setIsPrimaryKeyMapping, setIsReadOnly, setMapsIdValue, setProperties, setProperty, setSetMethodName, setWeight, toString, validateAfterInitialization, valueFromObject, valueFromResultSet, valueFromRow, writeFromAttributeIntoRow, writeFromObjectIntoRow, writeFromObjectIntoRowForShallowInsert, writeFromObjectIntoRowForShallowInsertWithChangeRecord, writeFromObjectIntoRowForUpdate, writeFromObjectIntoRowForUpdateAfterShallowInsert, writeFromObjectIntoRowForUpdateBeforeShallowDelete, writeFromObjectIntoRowForWhereClause, writeFromObjectIntoRowWithChangeRecord, writeInsertFieldsIntoRow, writeUpdateFieldsIntoRow
protected static final java.lang.String Delete
protected static final java.lang.String Insert
protected static final java.lang.String DeleteAll
protected static final java.lang.String DeleteAtIndex
protected static final java.lang.String UpdateAtIndex
protected Converter valueConverter
protected java.lang.String valueConverterClassName
protected java.util.List<Expression> orderByExpressions
protected org.eclipse.persistence.internal.helper.DatabaseTable referenceTable
protected org.eclipse.persistence.internal.helper.DatabaseField directField
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> sourceKeyFields
protected java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> referenceKeyFields
protected DataModifyQuery insertQuery
protected ModifyQuery changeSetDeleteQuery
protected transient ModifyQuery changeSetDeleteNullQuery
protected boolean hasCustomDeleteQuery
protected boolean hasCustomInsertQuery
protected HistoryPolicy historyPolicy
protected ModifyQuery deleteAtIndexQuery
protected ModifyQuery updateAtIndexQuery
protected boolean hasCustomDeleteAtIndexQuery
protected boolean hasCustomUpdateAtIndexQuery
protected transient java.lang.Class attributeClassification
protected java.lang.String attributeClassificationName
public DirectCollectionMapping()
public void addAscendingOrdering()
public void addDescendingOrdering()
public void addOrdering(Expression expression)
public boolean isRelationalMapping()
DatabaseMapping
isRelationalMapping
in class DatabaseMapping
public Converter getValueConverter()
public void setValueConverter(Converter valueConverter)
public void setValueConverterClassName(java.lang.String valueConverterClassName)
public void addReferenceKeyField(org.eclipse.persistence.internal.helper.DatabaseField referenceForeignKeyField, org.eclipse.persistence.internal.helper.DatabaseField sourcePrimaryKeyField)
public void addReferenceKeyFieldName(java.lang.String referenceForeignKeyFieldName, java.lang.String sourcePrimaryKeyFieldName)
public ReadQuery prepareNestedBatchQuery(ObjectLevelReadQuery query)
prepareNestedBatchQuery
in class ForeignReferenceMapping
public ObjectLevelReadQuery prepareNestedJoins(org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery baseQuery, org.eclipse.persistence.internal.sessions.AbstractSession session)
prepareNestedJoins
in class ForeignReferenceMapping
protected java.lang.Object valueFromRowInternalWithJoin(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, org.eclipse.persistence.internal.sessions.AbstractSession executionSession, boolean isTargetProtected) throws DatabaseException
valueFromRowInternalWithJoin
in class CollectionMapping
DatabaseException
public void buildCopy(java.lang.Object copy, java.lang.Object original, CopyGroup group)
buildCopy
in class CollectionMapping
public java.lang.Object buildElementClone(java.lang.Object element, 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)
buildElementClone
in class CollectionMapping
public Expression buildExpression(java.lang.Object queryObject, QueryByExamplePolicy policy, Expression expressionBuilder, java.util.Map processedObjects, org.eclipse.persistence.internal.sessions.AbstractSession session)
buildExpression
in class CollectionMapping
protected void buildListOrderField()
buildListOrderField
in class CollectionMapping
public void cascadePerformRemoveIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemoveIfRequired
in class CollectionMapping
public void cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired
in class CollectionMapping
public void cascadeRegisterNewIfRequired(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map visitedObjects)
cascadeRegisterNewIfRequired
in class CollectionMapping
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, java.util.Set cascadeErrors)
cascadeDiscoverAndPersistUnregisteredNewObjects
in class CollectionMapping
public java.lang.Object clone()
clone
in class CollectionMapping
public void compareCollectionsForChange(java.lang.Object oldCollection, java.lang.Object newCollection, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareCollectionsForChange
in class CollectionMapping
public void compareListsForChange(java.util.List oldList, java.util.List newList, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractSession session)
public org.eclipse.persistence.internal.sessions.ChangeRecord compareForChange(java.lang.Object clone, java.lang.Object backUp, org.eclipse.persistence.internal.sessions.ObjectChangeSet owner, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareForChange
in class CollectionMapping
public boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject, org.eclipse.persistence.internal.sessions.AbstractSession session)
compareObjects
in class CollectionMapping
protected boolean compareLists(java.util.List firstList, java.util.List secondList)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses
in class CollectionMapping
classLoader
- protected java.lang.Object extractKeyFromTargetRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
extractKeyFromTargetRow
in class CollectionMapping
protected java.lang.Object extractBatchKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
extractBatchKeyFromRow
in class ForeignReferenceMapping
protected Expression buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query)
buildBatchCriteria
in class ForeignReferenceMapping
protected void executeBatchQuery(DatabaseQuery query, org.eclipse.persistence.internal.identitymaps.CacheKey parentCacheKey, java.util.Map referenceDataByKey, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
executeBatchQuery
in class CollectionMapping
public void fixRealObjectReferences(java.lang.Object object, java.util.Map objectInformation, java.util.Map processedObjects, ObjectLevelReadQuery query, DistributedSession session)
fixRealObjectReferences
in class CollectionMapping
public java.lang.Class getAttributeClassification()
getAttributeClassification
in class DatabaseMapping
public java.lang.String getAttributeClassificationName()
protected ModifyQuery getDeleteQuery()
protected ModifyQuery getDeleteNullQuery()
protected ModifyQuery getDeleteAtIndexQuery()
protected ModifyQuery getUpdateAtIndexQuery()
public java.util.Vector getSelectFields()
getSelectFields
in class DatabaseMapping
public java.util.Vector getSelectTables()
getSelectTables
in class DatabaseMapping
public org.eclipse.persistence.internal.helper.DatabaseField getDirectField()
public java.lang.String getDirectFieldName()
protected DataModifyQuery getInsertQuery()
public Expression getJoinCriteria(org.eclipse.persistence.internal.expressions.ObjectExpression context, Expression base)
getJoinCriteria
in class CollectionMapping
public java.lang.Object getObjectCorrespondingTo(java.lang.Object object, DistributedSession session, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query)
getObjectCorrespondingTo
in class CollectionMapping
public java.util.List<Expression> getOrderByExpressions()
public java.util.List<Expression> getOrderByNormalizedExpressions(Expression base)
getOrderByNormalizedExpressions
in class ForeignReferenceMapping
public HistoryPolicy getHistoryPolicy()
protected org.eclipse.persistence.internal.queries.ContainerPolicy getSelectionQueryContainerPolicy()
getSelectionQueryContainerPolicy
in class CollectionMapping
public java.lang.Class getReferenceClass()
getReferenceClass
in class ForeignReferenceMapping
public java.lang.String getReferenceClassName()
ForeignReferenceMapping
getReferenceClassName
in class ForeignReferenceMapping
public ClassDescriptor getReferenceDescriptor()
getReferenceDescriptor
in class ForeignReferenceMapping
public java.util.Vector getReferenceKeyFieldNames()
public java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getReferenceKeyFields()
public org.eclipse.persistence.internal.helper.DatabaseTable getReferenceTable()
public java.lang.String getReferenceTableName()
public java.lang.String getReferenceTableQualifiedName()
public DatabaseMapping getRelationshipPartner()
getRelationshipPartner
in class ForeignReferenceMapping
public java.util.Vector getSourceKeyFieldNames()
public java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> getSourceKeyFields()
protected boolean hasCustomDeleteQuery()
protected boolean hasCustomInsertQuery()
protected boolean hasCustomDeleteAtIndexQuery()
protected boolean hasCustomUpdateAtIndexQuery()
public boolean hasNestedIdentityReference()
hasNestedIdentityReference
in class ForeignReferenceMapping
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
initialize
in class CollectionMapping
DescriptorException
protected void initializeListOrderField(org.eclipse.persistence.internal.sessions.AbstractSession session)
initializeListOrderField
in class CollectionMapping
protected void initializeDeleteAllQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeDeleteQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeDeleteNullQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeDeleteAtIndexQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeUpdateAtIndexQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean shouldUseListOrderFieldTableExpression()
shouldUseListOrderFieldTableExpression
in class CollectionMapping
protected Expression createWhereClauseForDeleteQuery(ExpressionBuilder builder)
protected Expression createWhereClauseForDeleteNullQuery(ExpressionBuilder builder)
protected void initializeDirectField(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeInsertQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeReferenceDescriptor(org.eclipse.persistence.internal.sessions.AbstractSession session)
initializeReferenceDescriptor
in class ForeignReferenceMapping
protected void initializeReferenceKeys(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeReferenceTable(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
protected void initializeSelectionCriteria(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeSelectionQuery(org.eclipse.persistence.internal.sessions.AbstractSession session)
initializeSelectionQuery
in class ForeignReferenceMapping
protected void initializeSelectionStatement(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeSourceKeys(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected void initializeSourceKeysWithDefaults(org.eclipse.persistence.internal.sessions.AbstractSession session)
protected Expression getAdditionalFieldsBaseExpression(ReadQuery query)
getAdditionalFieldsBaseExpression
in class CollectionMapping
public boolean isDirectCollectionMapping()
isDirectCollectionMapping
in class DatabaseMapping
public boolean isElementCollectionMapping()
isElementCollectionMapping
in class DatabaseMapping
public boolean isJoiningSupported()
isJoiningSupported
in class ForeignReferenceMapping
protected boolean isKeyForSourceSpecified()
public boolean isLockableMapping()
isLockableMapping
in class ForeignReferenceMapping
public boolean isOwned()
isOwned
in class DatabaseMapping
public void iterateOnRealAttributeValue(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object realAttributeValue)
iterateOnRealAttributeValue
in class CollectionMapping
public void iterateOnElement(org.eclipse.persistence.internal.descriptors.DescriptorIterator iterator, java.lang.Object element)
iterateOnElement
in class CollectionMapping
public void mergeChangesIntoObject(java.lang.Object target, org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeChangesIntoObject
in class CollectionMapping
protected void mergeAddRemoveChanges(java.lang.Object valueOfTarget, java.lang.Object delegateTarget, org.eclipse.persistence.internal.sessions.DirectCollectionChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void mergeIntoObject(java.lang.Object target, boolean isTargetUnInitialized, java.lang.Object source, org.eclipse.persistence.internal.sessions.MergeManager mergeManager, org.eclipse.persistence.internal.sessions.AbstractSession targetSession)
mergeIntoObject
in class CollectionMapping
public void performDataModificationEvent(java.lang.Object[] event, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException, DescriptorException
performDataModificationEvent
in class DatabaseMapping
DatabaseException
DescriptorException
public void postCalculateChanges(ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
postCalculateChanges
in class CollectionMapping
public void postInsert(WriteObjectQuery query) throws DatabaseException
postInsert
in class CollectionMapping
DatabaseException
public java.lang.Object getFieldValue(java.lang.Object attributeValue, org.eclipse.persistence.internal.sessions.AbstractSession session)
public java.util.Vector getFieldsForTranslationInAggregate()
getFieldsForTranslationInAggregate
in class ForeignReferenceMapping
public void postUpdate(WriteObjectQuery writeQuery) throws DatabaseException
postUpdate
in class DatabaseMapping
DatabaseException
protected void postUpdateWithChangeSet(WriteObjectQuery writeQuery) throws DatabaseException
DatabaseException
protected void postUpdateWithChangeSetListOrder(WriteObjectQuery writeQuery) throws DatabaseException
DatabaseException
public void preDelete(DeleteObjectQuery query) throws DatabaseException
preDelete
in class DatabaseMapping
DatabaseException
protected void prepareTranslationRow(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, java.lang.Object object, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
prepareTranslationRow
in class CollectionMapping
protected void initOrRebuildSelectQuery()
public void recordPrivateOwnedRemovals(java.lang.Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
recordPrivateOwnedRemovals
in class CollectionMapping
public void remoteInitialization(DistributedSession session)
remoteInitialization
in class ForeignReferenceMapping
public java.util.Map replaceValueHoldersIn(java.lang.Object object, org.eclipse.persistence.internal.sessions.remote.RemoteSessionController controller)
replaceValueHoldersIn
in class CollectionMapping
public void setAttributeClassification(java.lang.Class attributeClassification)
public void setAttributeClassificationName(java.lang.String attributeClassificationName)
protected void setDeleteQuery(ModifyQuery query)
public void setDeleteSQLString(java.lang.String sqlString)
public void setContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
setContainerPolicy
in interface ContainerMapping
setContainerPolicy
in class CollectionMapping
public void setCustomDeleteQuery(ModifyQuery query)
public void setCustomDeleteAtIndexQuery(ModifyQuery query)
public void setCustomInsertQuery(DataModifyQuery query)
public void setCustomUpdateAtIndexQuery(ModifyQuery query)
public void setDirectField(org.eclipse.persistence.internal.helper.DatabaseField field)
public void setDirectFieldClassification(java.lang.Class fieldType)
public void setDirectFieldClassificationName(java.lang.String className)
public void setDirectFieldName(java.lang.String fieldName)
protected void setHasCustomDeleteQuery(boolean bool)
protected void setHasCustomInsertQuery(boolean bool)
protected void setInsertQuery(DataModifyQuery insertQuery)
public void setInsertSQLString(java.lang.String sqlString)
Example, 'insert into RESPONS (EMP_ID, RES_DESC) values (#EMP_ID, #RES_DESC)'.
public void setReferenceClass(java.lang.Class referenceClass)
setReferenceClass
in class ForeignReferenceMapping
public void setReferenceClassName(java.lang.String referenceClassName)
ForeignReferenceMapping
setReferenceClassName
in class ForeignReferenceMapping
public void setReferenceKeyFieldName(java.lang.String fieldName)
public void setReferenceKeyFieldNames(java.util.Vector fieldNames)
public void setReferenceKeyFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> aVector)
public void setReferenceTable(org.eclipse.persistence.internal.helper.DatabaseTable table)
public void setSelectionCriteria(Expression anExpression)
setSelectionCriteria
in class ForeignReferenceMapping
public void setReferenceTableName(java.lang.String tableName)
protected void setSelectionQueryContainerPolicy(org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
setSelectionQueryContainerPolicy
in class CollectionMapping
public void setHistoryPolicy(HistoryPolicy policy)
public void setSessionName(java.lang.String name)
setSessionName
in class CollectionMapping
public void setSourceKeyFieldNames(java.util.Vector fieldNames)
public void setSourceKeyFields(java.util.Vector<org.eclipse.persistence.internal.helper.DatabaseField> sourceKeyFields)
public void collectQueryParameters(java.util.Set<org.eclipse.persistence.internal.helper.DatabaseField> cacheFields)
collectQueryParameters
in class CollectionMapping
public void calculateDeferredChanges(org.eclipse.persistence.internal.sessions.ChangeRecord changeRecord, org.eclipse.persistence.internal.sessions.AbstractSession session)
calculateDeferredChanges
in class CollectionMapping
public void simpleAddToCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object objectToAdd, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleAddToCollectionChangeRecord
in class CollectionMapping
protected void simpleAddToCollectionChangeRecord(java.lang.Object objectToAdd, java.lang.Integer index, boolean isSet, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isChangeApplied)
public void simpleRemoveFromCollectionChangeRecord(java.lang.Object referenceKey, java.lang.Object objectToRemove, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
simpleRemoveFromCollectionChangeRecord
in class CollectionMapping
protected void simpleRemoveFromCollectionChangeRecord(java.lang.Object objectToRemove, java.lang.Integer index, boolean isSet, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isChangeApplied)
public void updateChangeRecord(java.lang.Object clone, java.lang.Object newValue, java.lang.Object oldValue, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
updateChangeRecord
in class CollectionMapping
public void updateCollectionChangeRecord(CollectionChangeEvent event, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
updateCollectionChangeRecord
in class CollectionMapping
public void useMapClass(java.lang.Class concreteClass, java.lang.String methodName)
useMapClass
in interface ContainerMapping
useMapClass
in class CollectionMapping
DirectMapMapping
public java.lang.Object valueFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.queries.JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isTargetProtected, java.lang.Boolean[] wasCacheUsed) throws DatabaseException
valueFromRow
in class ForeignReferenceMapping
DatabaseException
public boolean verifyDelete(java.lang.Object object, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DatabaseException
verifyDelete
in class CollectionMapping
DatabaseException
public boolean isCandidateForPrivateOwnedRemoval()
isCandidateForPrivateOwnedRemoval
in class DatabaseMapping
public boolean isCascadedLockingSupported()
isCascadedLockingSupported
in class DatabaseMapping