public enum OptimisticLockStyle extends Enum<OptimisticLockStyle>
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
public static final OptimisticLockStyle VERSION
public static final OptimisticLockStyle DIRTY
public static final OptimisticLockStyle ALL
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)
oldCode
- The old int constant codeIllegalArgumentException
- If the code did not match any legacy constant.Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.