public enum OptimisticLockStyle extends Enum<OptimisticLockStyle>
Describes how an entity should be optimistically locked.
Enum Constant and Description |
---|
ALL
all columns are compared
|
DIRTY
dirty columns are compared
|
NONE
no optimistic locking
|
VERSION
use a dedicated version column
|
Modifier and Type | Method and Description |
---|---|
int |
getOldCode() |
static OptimisticLockStyle |
interpretOldCode(int oldCode)
Given an old code (one of the int constants from Cascade), interpret it as one of the new enums.
|
static OptimisticLockStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OptimisticLockStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OptimisticLockStyle NONE
no optimistic locking
public static final OptimisticLockStyle VERSION
use a dedicated version column
public static final OptimisticLockStyle DIRTY
dirty columns are compared
public static final OptimisticLockStyle ALL
all columns are compared
public static OptimisticLockStyle[] values()
for (OptimisticLockStyle c : OptimisticLockStyle.values()) System.out.println(c);
public static OptimisticLockStyle valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getOldCode()
public static OptimisticLockStyle interpretOldCode(int oldCode)
Given an old code (one of the int constants from Cascade), interpret it as one of the new enums.
oldCode
- The old int constant codeIllegalArgumentException
- If the code did not match any legacy constant.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.