|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<PersistenceContext.Kind>
fr.umlv.javaodb.PersistenceContext.Kind
public static enum PersistenceContext.Kind
The kind of peristence context.
| Enum Constant Summary | |
|---|---|
FAT_LOCK
When the context is created, a lock is taken on the database. |
|
LIGHT_LOCK
Each time a value of an object given by PersistenceContext.findAll(Class),
PersistenceContext.findById(long, Class) or
PersistenceContext.create(Class)
is read or written, a lock on that
object is taken. |
|
OPTIMISTIC
Each time a value of an object given by PersistenceContext.findAll(Class),
PersistenceContext.findById(long, Class) or
PersistenceContext.create(Class)
is modified, the context saves the old value. |
|
| Method Summary | |
|---|---|
static PersistenceContext.Kind |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static PersistenceContext.Kind[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final PersistenceContext.Kind FAT_LOCK
rollback
or a commit.
public static final PersistenceContext.Kind LIGHT_LOCK
PersistenceContext.findAll(Class),
PersistenceContext.findById(long, Class) or
PersistenceContext.create(Class)
is read or written, a lock on that
object is taken.
In case of deadlock a RollbackException is raised.
public static final PersistenceContext.Kind OPTIMISTIC
PersistenceContext.findAll(Class),
PersistenceContext.findById(long, Class) or
PersistenceContext.create(Class)
is modified, the context saves the old value.
During the commit, the context checks that any modified
values was not changed by another context. If at least one
value has changed a RollbackException is raised
else all changes are commited atomically.
| Method Detail |
|---|
public static PersistenceContext.Kind[] values()
for (PersistenceContext.Kind c : PersistenceContext.Kind.values()) System.out.println(c);
public static PersistenceContext.Kind valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||