| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed
Track closed state of the
results. |
private static CentralLogger |
LOG
Logger
|
private Persistence |
persistence
Persistence object which provided the underlying ScrollableResults
|
private Persistence.Context |
persistenceContext
The
Persistence context. |
private ScrollableResults<java.lang.Object> |
results
Scrollable result set; primary keys or
Records |
| Constructor and Description |
|---|
ScrollingResults(Persistence persistence,
ScrollableResults<java.lang.Object> results)
Construct an instance of this object from a scrollable result set
provided by query execution.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Close the wrapped
ScrollableResults object. |
boolean |
first()
Move cursor to the first result row.
|
java.lang.Object[] |
get()
Get the array of objects at the current result row.
|
java.lang.Object[] |
get(boolean forceOnlyId)
Get the array of objects at the current result row
when forceOnlyId is false.
|
java.lang.Object |
get(int column)
Get the object at the current result row, at the specified column.
|
java.lang.Long |
getID(int column)
Get the primary key ID at the current result row, at the specified
column.
|
int |
getRowNumber()
Get the row number currently under the cursor.
|
boolean |
isFirst()
Is the cursor on the first row in the result set?
|
boolean |
isLast()
Is the cursor on the last row in the result set?
|
boolean |
last()
Move cursor to the last result row.
|
boolean |
next()
Move cursor to the next result row.
|
boolean |
previous()
Move cursor to the previous result row.
|
void |
reset()
Reset the cursor to its natural starting position, before the first
result row.
|
boolean |
scroll(int rows)
Scroll the cursor ahead by the specified number of rows.
|
void |
sessionClosing()
Invoked when the current Hibernate session is about to close.
|
boolean |
setRowNumber(int row)
Set the row number currently under the cursor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddRow, deleteRow, getNumberOfLoadedRows, isAutoFetch, isResultSetCachedprivate static final CentralLogger LOG
private final ScrollableResults<java.lang.Object> results
Recordsprivate final Persistence persistence
private final Persistence.Context persistenceContext
Persistence context. Only used at cleanup time when the getter is not accessible
any more.private boolean closed
results.ScrollingResults(Persistence persistence, ScrollableResults<java.lang.Object> results) throws PersistenceException
persistence - The associated persistence service object.results - Scrollable result set generated by the query.PersistenceExceptionpublic boolean first()
public boolean last()
public boolean next()
public boolean previous()
public boolean isFirst()
public boolean isLast()
public java.lang.Object[] get()
public java.lang.Object[] get(boolean forceOnlyId)
public java.lang.Object get(int column)
public java.lang.Long getID(int column)
public int getRowNumber()
getRowNumber in interface Results-1
if the cursor is not currently on a result.public boolean setRowNumber(int row)
setRowNumber in interface Resultsrow - Zero-based index of the row to be set as the current row.true if there is a row at the specified row
number; else false.public boolean scroll(int rows)
public void reset()
public void sessionClosing()
sessionClosing in interface Results