Module org.eclipse.persistence.core
Enum OptimisticLockingType
- All Implemented Interfaces:
Serializable
,Comparable<OptimisticLockingType>
,java.lang.constant.Constable
An enum that is used within the OptimisticLocking annotation.
- Since:
- Oracle TopLink 11.1.1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionUsing this type of locking policy compares every field in the table in the WHERE clause when doing an update or a delete.Using this type of locking policy compares only the changed fields in the WHERE clause when doing an update.Using this type of locking compares selected fields in the WHERE clause when doing an update or a delete.Using this type of locking policy compares a single version number in the where clause when doing an update. -
Method Summary
Modifier and TypeMethodDescriptionstatic OptimisticLockingType
Returns the enum constant of this type with the specified name.static OptimisticLockingType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALL_COLUMNS
Using this type of locking policy compares every field in the table in the WHERE clause when doing an update or a delete. If any field has been changed, an optimistic locking exception will be thrown. -
CHANGED_COLUMNS
Using this type of locking policy compares only the changed fields in the WHERE clause when doing an update. If any field has been changed, an optimistic locking exception will be thrown. A delete will only compare the primary key. -
SELECTED_COLUMNS
Using this type of locking compares selected fields in the WHERE clause when doing an update or a delete. If any field has been changed, an optimistic locking exception will be thrown. Note that the fields specified must be mapped and not be primary keys. -
VERSION_COLUMN
Using this type of locking policy compares a single version number in the where clause when doing an update. The version field must be mapped and not be the primary key.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-