Class CommitOrderType


  • public class CommitOrderType
    extends java.lang.Object
    Commit order type persistence property values.

    JPA persistence property Usage:

    properties.add(PersistenceUnitProperties.PERSISTENCE_CONTEXT_COMMIT_ORDER, CommitOrderType.Changes);

    Property values are case-insensitive. Defines the ordering of updates and deletes of a set of the same entity type during a commit or flush operation. The commit order of entities is defined by their foreign key constraints, and then sorted alphabetically.\

    By default the commit of a set of the same entity type is not ordered.

    Entity type commit order can be modified using a DescriptorCustomizer and the ClassDescriptor.addConstraintDependency() API. Commit order can also be controlled using the EntityManager.flush() API.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String Changes
      Updates are ordered by the object's changes, then by id.
      static java.lang.String DEFAULT  
      static java.lang.String Id
      Updates and deletes are ordered by the object's id.
      static java.lang.String None
      No ordering is done.
    • Constructor Summary

      Constructors 
      Constructor Description
      CommitOrderType()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Id

        public static final java.lang.String Id
        Updates and deletes are ordered by the object's id. This can help avoid deadlocks on highly concurrent systems.
        See Also:
        Constant Field Values
      • Changes

        public static final java.lang.String Changes
        Updates are ordered by the object's changes, then by id. This can improve batch writing efficiency.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CommitOrderType

        public CommitOrderType()