Package org.eclipse.persistence.sessions
Enum UnitOfWork.CommitOrderType
- java.lang.Object
-
- java.lang.Enum<UnitOfWork.CommitOrderType>
-
- org.eclipse.persistence.sessions.UnitOfWork.CommitOrderType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UnitOfWork.CommitOrderType>
- Enclosing interface:
- UnitOfWork
public static enum UnitOfWork.CommitOrderType extends java.lang.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.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UnitOfWork.CommitOrderType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static UnitOfWork.CommitOrderType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static UnitOfWork.CommitOrderType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UnitOfWork.CommitOrderType c : UnitOfWork.CommitOrderType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UnitOfWork.CommitOrderType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-