Package org.hibernate
Enum Class ScrollMode
- All Implemented Interfaces:
Serializable
,Comparable<ScrollMode>
,Constable
Specifies the type of JDBC scrollable result set
to use underneath a
ScrollableResults
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRequests a scrollable result that is only scrollable forwards.Requests a scrollable result which is insensitive to changes in the underlying data.Requests a scrollable result which is sensitive to changes in the underlying data. -
Method Summary
Modifier and TypeMethodDescriptionboolean
lessThan
(ScrollMode other) Determine ifthis
mode is "less than" the provided mode.int
Get the corresponding JDBC scroll type code constant value.static ScrollMode
Returns the enum constant of this class with the specified name.static ScrollMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORWARD_ONLY
Requests a scrollable result that is only scrollable forwards.- See Also:
-
SCROLL_SENSITIVE
Requests a scrollable result which is sensitive to changes in the underlying data.- See Also:
-
SCROLL_INSENSITIVE
Requests a scrollable result which is insensitive to changes in the underlying data.Note that since the Hibernate session acts as a cache, you might need to explicitly evict objects, if you need to see changes made by other transactions.
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toResultSetType
public int toResultSetType()Get the corresponding JDBC scroll type code constant value.- Returns:
- the JDBC result set type code
-
lessThan
Determine ifthis
mode is "less than" the provided mode.- Parameters:
other
- The provided mode- Returns:
true
if this mode is less than the other.
-