Tóm Tắt
org.hibernate
Class FlushMode
- All Implemented Interfaces:
- Serializable
-
public final class FlushMode
- extends Object
- implements Serializable
- extends Object
Represents a flushing strategy. The flush process synchronizes
database state with session state by detecting state changes
and executing SQL statements.
Field Summary
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.
Method Summary
static boolean
isManualFlushMode(FlushMode mode)
boolean
lessThan(FlushMode other)
static FlushMode
parse(String name)
String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
NEVER
public static final FlushMode NEVER
- Deprecated. use
MANUAL
instead.- The
Session
is never flushed unlessSession.flush()
is explicitly called by the application. This mode is very
efficient for read only transactions. - The
MANUAL
public static final FlushMode MANUAL
- The
Session
is only ever flushed whenSession.flush()
is explicitly called by the application. This mode is very
efficient for read only transactions.
COMMIT
public static final FlushMode COMMIT
- The
Session
is flushed whenTransaction.commit()
is called.
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.
ALWAYS
public static final FlushMode ALWAYS
- The
Session
is flushed before every query. This is
almost always unnecessary and inefficient.
Method Detail
toString
public String toString()
-
- Overrides:
toString
in classObject
-
lessThan
public boolean lessThan(FlushMode other)
isManualFlushMode
public static boolean isManualFlushMode(FlushMode mode)
parse
public static FlushMode parse(String name)
Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.