public final class FlushMode extends Object implements Serializable
Session.setFlushMode(FlushMode)
,
Query.setFlushMode(FlushMode)
,
Criteria.setFlushMode(FlushMode)
,
Serialized FormModifier and Type | Field and Description |
---|---|
static FlushMode |
ALWAYS
The
Session is flushed before every query. |
static FlushMode |
AUTO
The
Session is sometimes flushed before query execution
in order to ensure that queries never return stale state. |
static FlushMode |
COMMIT
The
Session is flushed when Transaction.commit()
is called. |
static FlushMode |
MANUAL
The
Session is only ever flushed when Session.flush()
is explicitly called by the application. |
static FlushMode |
NEVER
Deprecated.
use
MANUAL instead. |
Modifier and Type | Method and Description |
---|---|
static boolean |
isManualFlushMode(FlushMode mode) |
boolean |
lessThan(FlushMode other) |
static FlushMode |
parse(String name) |
String |
toString() |
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.Copyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved