Top Description Fields Constructors Methods
org.hibernate

public final Class FlushMode

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.util.HashMap, .Map

Represents a flushing strategy. The flush process synchronizes database state with session state by detecting state changes and executing SQL statements.
Author
Gavin King
See Also
Session#setFlushMode(FlushMode), Query#setFlushMode(FlushMode), Criteria#setFlushMode(FlushMode)

Field Summary

Modifier and TypeField and Description
public static final FlushMode
ALWAYS

The Session is flushed before every query.

public static final FlushMode
AUTO

The Session is sometimes flushed before query execution in order to ensure that queries never return stale state.

public static final FlushMode
COMMIT

The Session is flushed when Transaction#commit is called.

private static final Map<K, V>
private final int
public static final FlushMode
MANUAL

The Session is only ever flushed when Session#flush is explicitly called by the application.

private final String
public static final FlushMode
NEVER

The Session is never flushed unless Session#flush is explicitly called by the application.

Constructor Summary

AccessConstructor and Description
private
FlushMode(int level, String name)

Method Summary

Modifier and TypeMethod and Description
public static boolean
public boolean
public static FlushMode
parse(String name)

private Object
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

ALWAYSback to summary
public static final FlushMode ALWAYS

The Session is flushed before every query. This is almost always unnecessary and inefficient.

AUTOback to summary
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.

COMMITback to summary
public static final FlushMode COMMIT

The Session is flushed when Transaction#commit is called.

INSTANCESback to summary
private static final Map<K, V> INSTANCES
levelback to summary
private final int level
MANUALback to summary
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.

nameback to summary
private final String name
NEVERback to summary
public static final FlushMode NEVER

Deprecated

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.

Constructor Detail

FlushModeback to summary
private FlushMode(int level, String name)

Method Detail

isManualFlushModeback to summary
public static boolean isManualFlushMode(FlushMode mode)
lessThanback to summary
public boolean lessThan(FlushMode other)
parseback to summary
public static FlushMode parse(String name)
readResolveback to summary
private Object readResolve()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.