|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<FlushMode> org.hibernate.FlushMode
public enum FlushMode
Represents a flushing strategy. The flush process synchronizes database state with session state by detecting state changes and executing SQL statements.
Session.setFlushMode(FlushMode)
,
Query.setFlushMode(FlushMode)
,
Criteria.setFlushMode(FlushMode)
Enum Constant Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
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 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 final FlushMode ALWAYS
Session
is flushed before every query. This is
almost always unnecessary and inefficient.
Method Detail |
---|
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 name
NullPointerException
- if the argument is nullpublic boolean lessThan(FlushMode other)
public static boolean isManualFlushMode(FlushMode mode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |