public class ScrollableResultsImpl extends AbstractScrollableResults implements ScrollableResults
Constructor and Description |
---|
ScrollableResultsImpl(ResultSet rs,
PreparedStatement ps,
SessionImplementor sess,
Loader loader,
QueryParameters queryParameters,
Type[] types,
HolderInstantiator holderInstantiator)
Constructs a ScrollableResultsImpl using the specified information.
|
Modifier and Type | Method and Description |
---|---|
void |
afterLast()
Go to a location just after the last result.
|
void |
beforeFirst()
Go to a location just before first result, This is the location of the cursor on a newly returned
scrollable result.
|
protected JDBCException |
convert(SQLException sqle,
String message) |
boolean |
first()
Go to the first result.
|
protected Object[] |
getCurrentRow() |
int |
getRowNumber()
Get the current position in the results.
|
boolean |
isFirst()
Is this the first result?
|
boolean |
isLast()
Is this the last result?
|
boolean |
last()
Go to the last result.
|
boolean |
next()
Advance to the next result.
|
boolean |
previous()
Retreat to the previous result.
|
boolean |
scroll(int i)
Scroll the specified number of positions from the current position.
|
boolean |
setRowNumber(int rowNumber)
Set the current position in the result set.
|
afterScrollOperation, close, get, get, getBigDecimal, getBigInteger, getBinary, getBlob, getBoolean, getByte, getCalendar, getCharacter, getClob, getDate, getDouble, getFinal, getFloat, getHolderInstantiator, getInteger, getLoader, getLocale, getLong, getNonFinal, getPs, getQueryParameters, getResultSet, getSession, getShort, getString, getText, getTimeZone, getType, getTypes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, get, get, getBigDecimal, getBigInteger, getBinary, getBlob, getBoolean, getByte, getCalendar, getCharacter, getClob, getDate, getDouble, getFloat, getInteger, getLocale, getLong, getShort, getString, getText, getTimeZone, getType
public ScrollableResultsImpl(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator)
rs
- The scrollable result setps
- The prepared statement used to obtain the result setsess
- The originating sessionloader
- The loaderqueryParameters
- query parameterstypes
- The result typesholderInstantiator
- Ughprotected Object[] getCurrentRow()
getCurrentRow
in class AbstractScrollableResults
public boolean scroll(int i)
ScrollableResults
scroll
in interface ScrollableResults
i
- a positive (forward) or negative (backward) number of rowstrue
if there is a result at the new locationprotected JDBCException convert(SQLException sqle, String message)
public boolean first()
ScrollableResults
first
in interface ScrollableResults
true
if there are any resultspublic boolean last()
ScrollableResults
last
in interface ScrollableResults
true
if there are any resultspublic boolean next()
ScrollableResults
next
in interface ScrollableResults
true
if there is another resultpublic boolean previous()
ScrollableResults
previous
in interface ScrollableResults
true
if there is a previous resultpublic void afterLast()
ScrollableResults
afterLast
in interface ScrollableResults
public void beforeFirst()
ScrollableResults
beforeFirst
in interface ScrollableResults
public boolean isFirst()
ScrollableResults
isFirst
in interface ScrollableResults
true
if this is the first row of results, otherwise false
public boolean isLast()
ScrollableResults
isLast
in interface ScrollableResults
true
if this is the last row of results.public int getRowNumber() throws HibernateException
ScrollableResults
getRowNumber
in interface ScrollableResults
HibernateException
public boolean setRowNumber(int rowNumber) throws HibernateException
ScrollableResults
setRowNumber
in interface ScrollableResults
rowNumber
- the row number. A positive number indicates a value numbered from the first row; a
negative number indicates a value numbered from the last row.HibernateException
Copyright © 2016 JBoss by Red Hat. All rights reserved.