Package org.hibernate.impl
Class FetchingScrollableResultsImpl
java.lang.Object
org.hibernate.impl.AbstractScrollableResults
org.hibernate.impl.FetchingScrollableResultsImpl
- All Implemented Interfaces:
ScrollableResults
Implementation of ScrollableResults which can handle collection fetches.
-
Constructor Summary
ConstructorsConstructorDescriptionFetchingScrollableResultsImpl(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator) -
Method Summary
Modifier and TypeMethodDescriptionvoidGo to a location just after the last resultvoidGo to a location just before first result (this is the initial location)booleanfirst()Go to the first resultprotected Object[]intGet the current location in the result set.booleanisFirst()Is this the first result?booleanisLast()Is this the last result?booleanlast()Go to the last resultbooleannext()Advance to the next resultbooleanprevious()Retreat to the previous resultbooleanscroll(int positions) Scroll an arbitrary number of locationsbooleansetRowNumber(int rowNumber) Set the current location in the result set, numbered from either the first row (row number 0), or the last row (row number -1).Methods inherited from class org.hibernate.impl.AbstractScrollableResults
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
-
Constructor Details
-
FetchingScrollableResultsImpl
public FetchingScrollableResultsImpl(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator) throws MappingException - Throws:
MappingException
-
-
Method Details
-
getCurrentRow
- Specified by:
getCurrentRowin classAbstractScrollableResults
-
next
Advance to the next result- Returns:
- true if there is another result
- Throws:
HibernateException
-
previous
Retreat to the previous result- Returns:
- true if there is a previous result
- Throws:
HibernateException
-
scroll
Scroll an arbitrary number of locations- Parameters:
positions- a positive (forward) or negative (backward) number of rows- Returns:
- true if there is a result at the new location
- Throws:
HibernateException
-
last
Go to the last result- Returns:
- true if there are any results
- Throws:
HibernateException
-
first
Go to the first result- Returns:
- true if there are any results
- Throws:
HibernateException
-
beforeFirst
Go to a location just before first result (this is the initial location)- Throws:
HibernateException
-
afterLast
Go to a location just after the last result- Throws:
HibernateException
-
isFirst
Is this the first result?- Returns:
- true if this is the first row of results
- Throws:
HibernateException
-
isLast
Is this the last result?- Returns:
- true if this is the last row of results
- Throws:
HibernateException
-
getRowNumber
Get the current location in the result set. The first row is number 0, contrary to JDBC.- Returns:
- the row number, numbered from 0, or -1 if there is no current row
- Throws:
HibernateException
-
setRowNumber
Set the current location in the result set, numbered from either the first row (row number 0), or the last row (row number -1).- Parameters:
rowNumber- the row number, numbered from the last row, in the case of a negative row number- Returns:
- true if there is a row at that row number
- Throws:
HibernateException
-