public enum FlushMode extends Enum<FlushMode>
Session.setFlushMode(FlushMode)
,
Query.setFlushMode(FlushMode)
,
Criteria.setFlushMode(FlushMode)
Enum Constant and Description |
---|
ALWAYS
The
Session is flushed before every query. |
AUTO
The
Session is sometimes flushed before query execution
in order to ensure that queries never return stale state. |
COMMIT
The
Session is flushed when Transaction.commit()
is called. |
MANUAL
The
Session is only ever flushed when Session.flush()
is explicitly called by the application. |
NEVER
Deprecated.
use
MANUAL instead. |
Modifier and Type | Method and Description |
---|---|
static boolean |
isManualFlushMode(FlushMode mode) |
boolean |
lessThan(FlushMode other) |
static FlushMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FlushMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FlushMode NEVER
MANUAL
instead.Session
is never flushed unless Session.flush()
is explicitly called by the application. This mode is very
efficient for read only transactions.public static final FlushMode MANUAL
Session
is only ever flushed when Session.flush()
is explicitly called by the application. This mode is very
efficient for read only transactions.public static final FlushMode COMMIT
Session
is flushed when Transaction.commit()
is called.public static final FlushMode AUTO
Session
is sometimes flushed before query execution
in order to ensure that queries never return stale state. This
is the default flush mode.public static FlushMode[] values()
for (FlushMode c : FlushMode.values()) System.out.println(c);
public static FlushMode 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 boolean lessThan(FlushMode other)
public static boolean isManualFlushMode(FlushMode mode)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.