Enum UnitOfWork.CommitOrderType

java.lang.Object
java.lang.Enum<UnitOfWork.CommitOrderType>
org.eclipse.persistence.sessions.UnitOfWork.CommitOrderType
All Implemented Interfaces:
Serializable, Comparable<UnitOfWork.CommitOrderType>, java.lang.constant.Constable
Enclosing interface:
UnitOfWork

public static enum UnitOfWork.CommitOrderType extends Enum<UnitOfWork.CommitOrderType>
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 ordered by primary key.

  • Enum Constant Details

    • ID

      public static final UnitOfWork.CommitOrderType ID
      Updates and deletes are ordered by the object's id. This can help avoid deadlocks on highly concurrent systems.
    • CHANGES

      public static final UnitOfWork.CommitOrderType CHANGES
      Updates are ordered by the object's changes, then by id. This can improve batch writing efficiency.
    • NONE

      public static final UnitOfWork.CommitOrderType NONE
      No ordering is done.
  • Method Details

    • values

      public static UnitOfWork.CommitOrderType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static UnitOfWork.CommitOrderType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null