org.hibernate
Class FlushMode
- Serializable
public final class FlushMode
extends java.lang.Object
implements Serializable
Represents a flushing strategy. The flush process synchronizes
database state with session state by detecting state changes
and executing SQL statements.
ALWAYS
public static final FlushMode ALWAYS
The
Session
is flushed before every query. This is
almost always unnecessary and inefficient.
AUTO
public static final FlushMode AUTO
The
Session
is sometimes flushed before query execution
in order to ensure that queries never return stale state. This
is the default flush mode.
MANUAL
public static final FlushMode MANUAL
The
Session
is only ever flushed when
Session.flush()
is explicitly called by the application. This mode is very
efficient for read only transactions.
NEVER
public static final FlushMode NEVER
use MANUAL
instead.
The
Session
is never flushed unless
Session.flush()
is explicitly called by the application. This mode is very
efficient for read only transactions.
isManualFlushMode
public static boolean isManualFlushMode(FlushMode mode)
lessThan
public boolean lessThan(FlushMode other)
parse
public static FlushMode parse(String name)
toString
public String toString()