public enum ScrollMode extends Enum<ScrollMode>
Specifies the type of JDBC scrollable result set to use underneath a ScrollableResults
.
Enum Constant and Description |
---|
FORWARD_ONLY
Requests a scrollable result that is only scrollable forwards.
|
SCROLL_INSENSITIVE
Requests a scrollable result which is insensitive to changes in the underlying data.
|
SCROLL_SENSITIVE
Requests a scrollable result which is sensitive to changes in the underlying data.
|
Modifier and Type | Method and Description |
---|---|
boolean |
lessThan(ScrollMode other)
Determine if
this mode is "less than" the provided mode. |
int |
toResultSetType()
Get the corresponding JDBC scroll type code constant value.
|
static ScrollMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ScrollMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ScrollMode FORWARD_ONLY
Requests a scrollable result that is only scrollable forwards.
ResultSet.TYPE_FORWARD_ONLY
public static final ScrollMode SCROLL_SENSITIVE
Requests a scrollable result which is sensitive to changes in the underlying data.
ResultSet.TYPE_SCROLL_SENSITIVE
public static final ScrollMode 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.
ResultSet.TYPE_SCROLL_INSENSITIVE
public static ScrollMode[] values()
for (ScrollMode c : ScrollMode.values()) System.out.println(c);
public static ScrollMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int toResultSetType()
Get the corresponding JDBC scroll type code constant value.
public boolean lessThan(ScrollMode other)
Determine if this
mode is "less than" the provided mode.
other
- The provided modetrue
if this mode is less than the other.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.