Class UnidirectionalOneToManyMapping

    • 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.
    • Constructor Detail

      • UnidirectionalOneToManyMapping

        public UnidirectionalOneToManyMapping()
        PUBLIC: Default constructor.
    • 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 class OneToManyMapping
      • 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 class CollectionMapping
        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.
      • 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 class CollectionMapping
      • 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 class CollectionMapping
      • 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 class DatabaseMapping
      • 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 class CollectionMapping
      • 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 class CollectionMapping
      • 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).