Package org.hibernate
Class FlushMode
java.lang.Object
org.hibernate.FlushMode
- All Implemented Interfaces:
Serializable
Represents a flushing strategy. The flush process synchronizes
database state with session state by detecting state changes
and executing SQL statements.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FlushModeTheSessionis flushed before every query.static final FlushModeTheSessionis sometimes flushed before query execution in order to ensure that queries never return stale state.static final FlushModeTheSessionis flushed whenTransaction.commit()is called.static final FlushModeTheSessionis only ever flushed whenSession.flush()is explicitly called by the application.static final FlushModeDeprecated. -
Method Summary
-
Field Details
-
NEVER
Deprecated.useMANUALinstead.TheSessionis never flushed unlessSession.flush()is explicitly called by the application. This mode is very efficient for read only transactions. -
MANUAL
TheSessionis only ever flushed whenSession.flush()is explicitly called by the application. This mode is very efficient for read only transactions. -
COMMIT
TheSessionis flushed whenTransaction.commit()is called. -
AUTO
TheSessionis sometimes flushed before query execution in order to ensure that queries never return stale state. This is the default flush mode. -
ALWAYS
TheSessionis flushed before every query. This is almost always unnecessary and inefficient.
-
-
Method Details
MANUALinstead.