Package org.hibernate.impl
Class ScrollableResultsImpl
java.lang.Object
org.hibernate.impl.AbstractScrollableResults
org.hibernate.impl.ScrollableResultsImpl
- All Implemented Interfaces:
ScrollableResults
Implementation of the ScrollableResults interface
-
Constructor Summary
ConstructorsConstructorDescriptionScrollableResultsImpl(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 i) 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, getTypesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.ScrollableResults
close, get, get, getBigDecimal, getBigInteger, getBinary, getBlob, getBoolean, getByte, getCalendar, getCharacter, getClob, getDate, getDouble, getFloat, getInteger, getLocale, getLong, getShort, getString, getText, getTimeZone, getType
-
Constructor Details
-
ScrollableResultsImpl
public ScrollableResultsImpl(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
-
scroll
Description copied from interface:ScrollableResultsScroll an arbitrary number of locations- Specified by:
scrollin interfaceScrollableResults- Parameters:
i- a positive (forward) or negative (backward) number of rows- Returns:
- true if there is a result at the new location
- Throws:
HibernateException- See Also:
-
first
Description copied from interface:ScrollableResultsGo to the first result- Specified by:
firstin interfaceScrollableResults- Returns:
- true if there are any results
- Throws:
HibernateException- See Also:
-
last
Description copied from interface:ScrollableResultsGo to the last result- Specified by:
lastin interfaceScrollableResults- Returns:
- true if there are any results
- Throws:
HibernateException- See Also:
-
next
Description copied from interface:ScrollableResultsAdvance to the next result- Specified by:
nextin interfaceScrollableResults- Returns:
- true if there is another result
- Throws:
HibernateException- See Also:
-
previous
Description copied from interface:ScrollableResultsRetreat to the previous result- Specified by:
previousin interfaceScrollableResults- Returns:
- true if there is a previous result
- Throws:
HibernateException- See Also:
-
afterLast
Description copied from interface:ScrollableResultsGo to a location just after the last result- Specified by:
afterLastin interfaceScrollableResults- Throws:
HibernateException- See Also:
-
beforeFirst
Description copied from interface:ScrollableResultsGo to a location just before first result (this is the initial location)- Specified by:
beforeFirstin interfaceScrollableResults- Throws:
HibernateException- See Also:
-
isFirst
Description copied from interface:ScrollableResultsIs this the first result?- Specified by:
isFirstin interfaceScrollableResults- Returns:
- true if this is the first row of results
- Throws:
HibernateException- See Also:
-
isLast
Description copied from interface:ScrollableResultsIs this the last result?- Specified by:
isLastin interfaceScrollableResults- Returns:
- true if this is the last row of results
- Throws:
HibernateException- See Also:
-
getRowNumber
Description copied from interface:ScrollableResultsGet the current location in the result set. The first row is number 0, contrary to JDBC.- Specified by:
getRowNumberin interfaceScrollableResults- Returns:
- the row number, numbered from 0, or -1 if there is no current row
- Throws:
HibernateException
-
setRowNumber
Description copied from interface:ScrollableResultsSet the current location in the result set, numbered from either the first row (row number 0), or the last row (row number -1).- Specified by:
setRowNumberin interfaceScrollableResults- 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
-