Package org.eclipse.persistence.mappings
Class UnidirectionalOneToManyMapping
- java.lang.Object
-
- org.eclipse.persistence.core.mappings.CoreMapping<AttributeAccessor,org.eclipse.persistence.internal.sessions.AbstractSession,org.eclipse.persistence.internal.queries.ContainerPolicy,ClassDescriptor,org.eclipse.persistence.internal.helper.DatabaseField>
-
- org.eclipse.persistence.mappings.DatabaseMapping
-
- org.eclipse.persistence.mappings.ForeignReferenceMapping
-
- org.eclipse.persistence.mappings.CollectionMapping
-
- org.eclipse.persistence.mappings.OneToManyMapping
-
- org.eclipse.persistence.mappings.UnidirectionalOneToManyMapping
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,ContainerMapping
,MapComponentMapping
,RelationalMapping
public class UnidirectionalOneToManyMapping extends OneToManyMapping
Purpose: UnidirectionalOneToManyMapping doesn't have 1:1 back reference mapping.
- See Also:
- Serialized Form
- Author:
- Andrei Ilitchev
- Since:
- Eclipselink 1.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.mappings.DatabaseMapping
DatabaseMapping.WriteType
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
shouldIncrementTargetLockValueOnAddOrRemoveTarget
Indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source.protected boolean
shouldIncrementTargetLockValueOnDeleteSource
Indicates whether target's optimistic locking value should be incremented on the source deletion.-
Fields inherited from class org.eclipse.persistence.mappings.OneToManyMapping
addTargetQuery, hasCustomAddTargetQuery, hasCustomRemoveAllTargetsQuery, hasCustomRemoveTargetQuery, ObjectAdded, ObjectRemoved, PostInsert, removeAllTargetsQuery, removeTargetQuery, shouldDeferInserts, sourceExpressionsToPostInitialize, sourceKeyFields, sourceKeysToTargetForeignKeys, targetExpressionsToPostInitialize, targetForeignKeyFields, targetForeignKeysToSourceKeys, targetForeignKeyTable, targetPrimaryKeyFields
-
Fields inherited from class org.eclipse.persistence.mappings.CollectionMapping
changeOrderTargetQuery, containerPolicy, deleteAllQuery, hasCustomDeleteAllQuery, hasOrderBy, isListOrderFieldSupported, isSynchronizeOnMerge, listOrderField, mustDeleteReferenceObjectsOneByOne, orderCorrectionType
-
Fields inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping
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
-
Fields inherited from class org.eclipse.persistence.mappings.DatabaseMapping
attributeAccessor, attributeName, derivedIdMapping, derivesId, descriptor, fields, isCacheable, isInSopObject, isJPAId, isLazy, isMapKeyMapping, isOptional, isPrimaryKeyMapping, isReadOnly, isRemotelyInitialized, mapsIdValue, NO_FIELDS, NO_WEIGHT, properties, unconvertedProperties, weight, WEIGHT_AGGREGATE, WEIGHT_DIRECT, WEIGHT_TO_ONE, WEIGHT_TRANSFORM
-
-
Constructor Summary
Constructors Constructor Description UnidirectionalOneToManyMapping()
PUBLIC: Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.persistence.internal.sessions.AbstractRecord
buildKeyRowForTargetUpdate(ObjectLevelModifyQuery query)
INTERNAL: Build a row containing the keys for use in the query that updates the row for the target object during an insert or updateorg.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 uow)
INTERNAL: This method is used to create a change record from comparing two collectionsprotected org.eclipse.persistence.internal.sessions.AbstractRecord
createModifyRowForAddTargetQuery()
INTERNAL:protected java.util.Vector
extractSourceKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Extract the source primary key value from the target row.void
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the mapping.boolean
isOwned()
INTERNAL:boolean
isUnidirectionalOneToManyMapping()
INTERNAL: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
postCalculateChangesOnDeleted(java.lang.Object deletedObject, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet uowChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.void
postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize the type of the target foreign key, as it will be null as it is not mapped in the target.protected void
postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)
INTERNAL: Add additional fieldsvoid
preDelete(DeleteObjectQuery query)
INTERNAL: Delete the reference objects.void
prepareCascadeLockingPolicy()
Prepare a cascade locking policy.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.boolean
requiresDataModificationEvents()
INTERNAL: UnidirectionalOneToManyMapping performs some events after INSERT/UPDATE to maintain the keysvoid
setShouldIncrementTargetLockValueOnAddOrRemoveTarget(boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget)
PUBLIC: Set value that indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source (default value is true).void
setShouldIncrementTargetLockValueOnDeleteSource(boolean shouldIncrementTargetLockValueOnDeleteSource)
PUBLIC: Set value that indicates whether target's optimistic locking value should be incremented on the source deletion (default value is true).boolean
shouldDeferInsert()
boolean
shouldIncrementTargetLockValueOnAddOrRemoveTarget()
PUBLIC: Indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source (default value is true).boolean
shouldIncrementTargetLockValueOnDeleteSource()
PUBLIC: Indicates whether target's optimistic locking value should be incremented on the source deletion (default value is true).protected boolean
shouldRemoveTargetQueryModifyTargetForeignKey()
INTERNAL Target foreign key of the removed object should be modified (set to null).-
Methods inherited from class org.eclipse.persistence.mappings.OneToManyMapping
addTargetForeignKeyField, addTargetForeignKeyFieldName, buildBatchCriteria, buildDefaultSelectionCriteriaAndAddFieldsToQuery, buildListOrderField, buildSelectionCriteria, clone, collectQueryParameters, createMapComponentFromRow, deleteAll, deleteReferenceObjectsLeftOnDatabase, extractBatchKeyFromRow, extractKeyFromTargetRow, getDeleteAllQuery, getFieldsForTranslationInAggregate, getSourceKeyFieldNames, getSourceKeyFields, getSourceKeysToTargetForeignKeys, getTargetForeignKeyFieldNames, getTargetForeignKeyFields, getTargetForeignKeysToSourceKeys, getTargetForeignKeyToSourceKeys, getTargetPrimaryKeyFields, hasInverseConstraintDependency, initializeAddTargetQuery, initializeChangeOrderTargetQuery, initializeDeleteAllQuery, initializeReferenceDescriptor, initializeRemoveAllTargetsQuery, initializeRemoveTargetQuery, initializeTargetForeignKeysToSourceKeys, initializeTargetPrimaryKeyFields, isCascadedLockingSupported, isJoiningSupported, isOneToManyMapping, isRelationalMapping, isSourceKeySpecified, objectAddedDuringUpdate, objectRemovedDuringUpdate, performDataModificationEvent, postInitializeSourceAndTargetExpressions, postInsert, postUpdate, setAddTargetSQLString, setCustomAddTargetQuery, setCustomRemoveAllTargetsQuery, setCustomRemoveTargetQuery, setDeleteAllSQLString, setSessionName, setShouldDeferInsert, setSourceKeyFieldNames, setSourceKeyFields, setTargetForeignKeyFieldName, setTargetForeignKeyFieldNames, setTargetForeignKeyFieldNames, setTargetForeignKeyFields, setTargetForeignKeysToSourceKeys, shouldObjectModifyCascadeToParts, updateTargetForeignKeyPostUpdateSource_ObjectAdded, updateTargetForeignKeyPostUpdateSource_ObjectRemoved, updateTargetRowPostInsertSource, updateTargetRowPreDeleteSource, verifyDelete
-
Methods inherited from class org.eclipse.persistence.mappings.CollectionMapping
addAggregateOrderBy, addAscendingOrdering, addDescendingOrdering, addOrderBy, buildBackupCloneForPartObject, buildChangeRecord, buildCloneForPartObject, buildContainerClone, buildCopy, buildElementClone, buildElementUnitOfWorkClone, buildExpression, buildReferencesPKList, calculateDeferredChanges, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadePerformRemovePrivateOwnedObjectFromChangeSetIfRequired, cascadeRegisterNewIfRequired, compareCollectionsForChange, compareLists, compareListsAndWrite, compareObjects, compareObjectsAndWrite, compareObjectsWithoutPrivateOwned, compareObjectsWithPrivateOwned, convertClassNamesToClasses, copyElement, executeBatchQuery, extractResultFromBatchQuery, fixRealObjectReferences, getAdditionalFieldsBaseExpression, getContainerPolicy, getJoinCriteria, getListOrderField, getObjectCorrespondingTo, getOrderByQueryKeyExpressions, getOrderCorrectionType, getRealCollectionAttributeValueFromObject, getSelectionQueryContainerPolicy, hasCustomDeleteAllQuery, hasOrderBy, initializeListOrderField, initializeListOrderFieldTable, isAttributeValueInstantiatedOrChanged, isChangeTrackingSupported, isCollectionMapping, isListOrderFieldSupported, isMapKeyObjectRelationship, iterateOnElement, iterateOnRealAttributeValue, load, loadAll, mergeChangesIntoObject, mergeIntoObject, mustDeleteReferenceObjectsOneByOne, objectOrderChangedDuringUpdate, objectUnchangedDuringUpdate, objectUnchangedDuringUpdate, postDelete, preInsert, preUpdate, readPrivateOwnedForObject, replaceValueHoldersIn, setChangeListener, setContainerPolicy, setCustomDeleteAllQuery, setDeleteAllCall, setDeleteAllQuery, setHasCustomDeleteAllQuery, setListOrderField, setListOrderFieldName, setMustDeleteReferenceObjectsOneByOne, setOrderCorrectionType, setSelectionQueryContainerPolicy, setUseLazyInstantiationForIndirectCollection, shouldUseLazyInstantiationForIndirectCollection, shouldUseListOrderFieldTableExpression, simpleAddToCollectionChangeRecord, simpleRemoveFromCollectionChangeRecord, updateChangeRecord, updateChangeRecordForSelfMerge, updateCollectionChangeRecord, useCollectionClass, useCollectionClassName, useListClassName, useMapClass, useMapClass, useMapClassName, useSortedSetClass, useSortedSetClassName, useSortedSetClassName, useTransparentCollection, useTransparentList, useTransparentMap, useTransparentSet, validateBeforeInitialization, valueFromPKList, valueFromRowInternalWithJoin, writeChanges
-
Methods inherited from class org.eclipse.persistence.mappings.ForeignReferenceMapping
addForeignKeyField, batchedValueFromRow, buildBackupClone, buildClone, buildCloneFromRow, checkCacheForBatchKey, createCloneValueHolder, dontDoMerge, dontUseBatchReading, dontUseIndirection, extendPessimisticLockScopeInSourceQuery, extendPessimisticLockScopeInTargetQuery, fixObjectReferences, getAttributeValueFromObject, getAttributeValueWithClonedValueHolders, getBatchFetchType, getExtendPessimisticLockScopeDedicatedQuery, getIndirectionPolicy, getJoinFetch, getMappedBy, getOrderByNormalizedExpressions, getPartitioningPolicy, getPartitioningPolicyName, getRealAttributeValueFromAttribute, getReferenceClass, getReferenceClassName, getReferenceDescriptor, getRelationshipPartner, getRelationshipPartnerAttributeName, getSelectionCriteria, getSelectionQuery, getTempSession, getValueFromRemoteValueHolder, hasCustomSelectionQuery, hasDependency, hasNestedIdentityReference, initializeSelectionQuery, instantiateAttribute, isAttributeValueFromObjectInstantiated, isAttributeValueFullyBuilt, isAttributeValueInstantiated, isCascadeDetach, isCascadeMerge, isCascadeOnDeleteSetOnDatabase, isCascadePersist, isCascadeRefresh, isCascadeRemove, isExtendingPessimisticLockScope, isForeignReferenceMapping, isInnerJoinFetched, isJoinFetched, isLazy, isLockableMapping, isOuterJoinFetched, isPrivateOwned, iterate, mergeRemoteValueHolder, preInitialize, prepareHistoricalQuery, prepareNestedBatchQuery, prepareNestedJoinQueryClone, prepareNestedJoins, privateOwnedRelationship, readFromRowIntoObject, remoteInitialization, requiresTransientWeavedFields, setBatchFetchType, setCascadeAll, setCascadeDetach, setCascadeMerge, setCascadePersist, setCascadeRefresh, setCascadeRemove, setCustomSelectionQuery, setForceInitializationOfSelectionCriteria, setHasCustomSelectionQuery, setIndirectionPolicy, setIsCacheable, setIsCascadeOnDeleteSetOnDatabase, setIsPrivateOwned, setJoinFetch, setMappedBy, setPartitioningPolicy, setPartitioningPolicyName, setRealAttributeValueInObject, setReferenceClass, setReferenceClassName, setReferenceDescriptor, setRelationshipPartner, setRelationshipPartnerAttributeName, setRequiresTransientWeavedFields, setSelectionCall, setSelectionCriteria, setSelectionQuery, setSelectionSQLString, setShouldExtendPessimisticLockScope, setTempSession, setUsesBatchReading, setUsesIndirection, shouldExtendPessimisticLockScope, shouldExtendPessimisticLockScopeInDedicatedQuery, shouldExtendPessimisticLockScopeInSourceQuery, shouldExtendPessimisticLockScopeInTargetQuery, shouldForceInitializationOfSelectionCriteria, shouldInitializeSelectionCriteria, shouldMergeCascadeParts, shouldMergeCascadeReference, shouldRefreshCascadeParts, shouldUseBatchReading, shouldUseValueFromRowWithJoin, trimRowForJoin, trimRowForJoin, useBasicIndirection, useBatchReading, useContainerIndirection, useInnerJoinFetch, useOuterJoinFetch, usesIndirection, useWeavedIndirection, valueFromRow, valueFromRowInternal, valueFromRowInternal
-
Methods inherited from class org.eclipse.persistence.mappings.DatabaseMapping
addUnconvertedProperty, buildObjectJoinExpression, buildObjectJoinExpression, buildShallowOriginalFromRow, cloneFields, collectFields, convertConverterClassNamesToClasses, derivesId, earlyPreDelete, extractNestedExpressions, extractNestedNonAggregateExpressions, getAttributeAccessor, getAttributeClassification, getAttributeName, getDerivedIdMapping, getDescriptor, getField, getFieldClassification, getFields, getGetMethodName, getMapsIdValue, getProperties, getProperty, getRealAttributeValueFromObject, getSelectFields, getSelectTables, getSetMethodName, getUnconvertedProperties, getWeight, hasConstraintDependency, hasMapsIdValue, hasRootExpressionThatShouldUseOuterJoin, hasUnconvertedProperties, isAbstractColumnMapping, isAbstractCompositeCollectionMapping, isAbstractCompositeDirectCollectionMapping, isAbstractCompositeObjectMapping, isAbstractDirectMapping, isAggregateCollectionMapping, isAggregateMapping, isAggregateObjectMapping, isCacheable, isCandidateForPrivateOwnedRemoval, isCloningRequired, isDatabaseMapping, isDirectCollectionMapping, isDirectMapMapping, isDirectToFieldMapping, isDirectToXMLTypeMapping, isEISMapping, isElementCollectionMapping, isInAndOutSopObject, isInOnlySopObject, isInSopObject, isJPAId, isManyToManyMapping, isManyToOneMapping, isMapKeyMapping, isMultitenantPrimaryKeyMapping, isNestedTableMapping, isObjectReferenceMapping, isOneToOneMapping, isOptional, isOutOnlySopObject, isOutSopObject, isPrimaryKeyMapping, isReadOnly, isReferenceMapping, isRemotelyInitialized, isStructureMapping, isTransformationMapping, isUsingMethodAccess, isVariableOneToOneMapping, isWriteOnly, isXMLMapping, 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
-
-
-
-
Field Detail
-
shouldIncrementTargetLockValueOnAddOrRemoveTarget
protected boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget
Indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source.
-
shouldIncrementTargetLockValueOnDeleteSource
protected boolean shouldIncrementTargetLockValueOnDeleteSource
Indicates whether target's optimistic locking value should be incremented on the source deletion. Note that if the flag is set to true then the indirection will be triggered on source delete - in order to verify all targets' versions.
-
-
Method Detail
-
buildKeyRowForTargetUpdate
protected org.eclipse.persistence.internal.sessions.AbstractRecord buildKeyRowForTargetUpdate(ObjectLevelModifyQuery query)
INTERNAL: Build a row containing the keys for use in the query that updates the row for the target object during an insert or update- Overrides:
buildKeyRowForTargetUpdate
in classOneToManyMapping
-
compareForChange
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 uow)
INTERNAL: This method is used to create a change record from comparing two collections- Overrides:
compareForChange
in classCollectionMapping
- Returns:
- org.eclipse.persistence.internal.sessions.ChangeRecord
-
extractSourceKeyFromRow
protected java.util.Vector extractSourceKeyFromRow(org.eclipse.persistence.internal.sessions.AbstractRecord row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Extract the source primary key value from the target row. Used for batch reading, most following same order and fields as in the mapping.
-
isOwned
public boolean isOwned()
INTERNAL:- Overrides:
isOwned
in classDatabaseMapping
-
isUnidirectionalOneToManyMapping
public boolean isUnidirectionalOneToManyMapping()
INTERNAL:- Overrides:
isUnidirectionalOneToManyMapping
in classDatabaseMapping
-
initialize
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
INTERNAL: Initialize the mapping.- Overrides:
initialize
in classOneToManyMapping
- Throws:
DescriptorException
-
postInitialize
public void postInitialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
Initialize the type of the target foreign key, as it will be null as it is not mapped in the target.- Overrides:
postInitialize
in classCollectionMapping
-
createModifyRowForAddTargetQuery
protected org.eclipse.persistence.internal.sessions.AbstractRecord createModifyRowForAddTargetQuery()
INTERNAL:- Overrides:
createModifyRowForAddTargetQuery
in classOneToManyMapping
-
preDelete
public void preDelete(DeleteObjectQuery query) throws DatabaseException, OptimisticLockException
INTERNAL: Delete the reference objects.- Overrides:
preDelete
in classOneToManyMapping
- Throws:
DatabaseException
OptimisticLockException
-
prepareCascadeLockingPolicy
public void prepareCascadeLockingPolicy()
Prepare a cascade locking policy.- Overrides:
prepareCascadeLockingPolicy
in classOneToManyMapping
-
postCalculateChanges
public 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.- Overrides:
postCalculateChanges
in classCollectionMapping
-
postCalculateChangesOnDeleted
public void postCalculateChangesOnDeleted(java.lang.Object deletedObject, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet uowChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL: Overridden by mappings that require objects to be deleted contribute to change set creation.- Overrides:
postCalculateChangesOnDeleted
in classDatabaseMapping
-
postPrepareNestedBatchQuery
protected void postPrepareNestedBatchQuery(ReadQuery batchQuery, ObjectLevelReadQuery query)
INTERNAL: Add additional fields- Overrides:
postPrepareNestedBatchQuery
in classCollectionMapping
-
prepareTranslationRow
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.- Overrides:
prepareTranslationRow
in classCollectionMapping
-
recordPrivateOwnedRemovals
public 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.- Overrides:
recordPrivateOwnedRemovals
in classCollectionMapping
-
requiresDataModificationEvents
public boolean requiresDataModificationEvents()
INTERNAL: UnidirectionalOneToManyMapping performs some events after INSERT/UPDATE to maintain the keys- Overrides:
requiresDataModificationEvents
in classOneToManyMapping
- Returns:
- See Also:
UnidirectionalOneToManyMapping
-
setShouldIncrementTargetLockValueOnAddOrRemoveTarget
public void setShouldIncrementTargetLockValueOnAddOrRemoveTarget(boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget)
PUBLIC: Set value that indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source (default value is true).
-
setShouldIncrementTargetLockValueOnDeleteSource
public void setShouldIncrementTargetLockValueOnDeleteSource(boolean shouldIncrementTargetLockValueOnDeleteSource)
PUBLIC: Set value that indicates whether target's optimistic locking value should be incremented on the source deletion (default value is true).
-
shouldIncrementTargetLockValueOnAddOrRemoveTarget
public boolean shouldIncrementTargetLockValueOnAddOrRemoveTarget()
PUBLIC: Indicates whether target's optimistic locking value should be incremented on target being added to / removed from a source (default value is true).
-
shouldIncrementTargetLockValueOnDeleteSource
public boolean shouldIncrementTargetLockValueOnDeleteSource()
PUBLIC: Indicates whether target's optimistic locking value should be incremented on the source deletion (default value is true).
-
shouldRemoveTargetQueryModifyTargetForeignKey
protected boolean shouldRemoveTargetQueryModifyTargetForeignKey()
INTERNAL Target foreign key of the removed object should be modified (set to null).- Overrides:
shouldRemoveTargetQueryModifyTargetForeignKey
in classOneToManyMapping
-
shouldDeferInsert
public boolean shouldDeferInsert()
- Overrides:
shouldDeferInsert
in classOneToManyMapping
-
-