Top Description Fields Constructors Methods
org.hibernate.impl

public Class ScrollableResultsImpl

extends AbstractScrollableResults
implements ScrollableResults
Class Inheritance
All Implemented Interfaces
org.hibernate.ScrollableResults
Imports
org.hibernate.HibernateException, .MappingException, .ScrollableResults, org.hibernate.engine.QueryParameters, .SessionImplementor, org.hibernate.exception.JDBCExceptionHelper, org.hibernate.hql.HolderInstantiator, org.hibernate.loader.Loader, org.hibernate.type.Type, java.sql.PreparedStatement, .ResultSet, .SQLException

Implementation of the ScrollableResults interface
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private Object[]

Constructor Summary

AccessConstructor and Description
public
ScrollableResultsImpl(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator)

Method Summary

Modifier and TypeMethod and Description
public void
afterLast()

Implements org.hibernate.ScrollableResults.afterLast.

Go to a location just after the last result
public void
beforeFirst()

Implements org.hibernate.ScrollableResults.beforeFirst.

Go to a location just before first result (this is the initial location)
public boolean
first()

Implements org.hibernate.ScrollableResults.first.

Go to the first result
protected Object[]
public int
getRowNumber()

Implements org.hibernate.ScrollableResults.getRowNumber.

Get the current location in the result set.
public boolean
isFirst()

Implements org.hibernate.ScrollableResults.isFirst.

Is this the first result?
public boolean
isLast()

Implements org.hibernate.ScrollableResults.isLast.

Is this the last result?
public boolean
last()

Implements org.hibernate.ScrollableResults.last.

Go to the last result
public boolean
next()

Implements org.hibernate.ScrollableResults.next.

Advance to the next result
private void
prepareCurrentRow(boolean underlyingScrollSuccessful)

public boolean
previous()

Implements org.hibernate.ScrollableResults.previous.

Retreat to the previous result
public boolean
scroll(int
a positive (forward) or negative (backward) number of rows
i
)

Implements org.hibernate.ScrollableResults.scroll.

Scroll an arbitrary number of locations
public boolean
setRowNumber(int
the row number, numbered from the last row, in the case of a negative row number
rowNumber
)

Implements org.hibernate.ScrollableResults.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).
Inherited from org.hibernate.impl.AbstractScrollableResults:
afterScrollOperationclosegetgetgetBigDecimalgetBigIntegergetBinarygetBlobgetBooleangetBytegetCalendargetCharactergetClobgetDategetDoublegetFinalgetFloatgetHolderInstantiatorgetIntegergetLoadergetLocalegetLonggetNonFinalgetPsgetQueryParametersgetResultSetgetSessiongetShortgetStringgetTextgetTimeZonegetTypegetTypes

Field Detail

currentRowback to summary
private Object[] currentRow

Constructor Detail

ScrollableResultsImplback to summary
public ScrollableResultsImpl(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator) throws MappingException

Method Detail

afterLastback to summary
public void afterLast() throws HibernateException

Implements org.hibernate.ScrollableResults.afterLast.

Doc from org.hibernate.ScrollableResults.afterLast.

Go to a location just after the last result

See Also
org.hibernate.ScrollableResults#afterLast()
beforeFirstback to summary
public void beforeFirst() throws HibernateException

Implements org.hibernate.ScrollableResults.beforeFirst.

Doc from org.hibernate.ScrollableResults.beforeFirst.

Go to a location just before first result (this is the initial location)

See Also
org.hibernate.ScrollableResults#beforeFirst()
firstback to summary
public boolean first() throws HibernateException

Implements org.hibernate.ScrollableResults.first.

Doc from org.hibernate.ScrollableResults.first.

Go to the first result

Returns:boolean

true if there are any results

See Also
org.hibernate.ScrollableResults#first()
getCurrentRowback to summary
protected Object[] getCurrentRow()

Implements abstract org.hibernate.impl.AbstractScrollableResults.getCurrentRow.

getRowNumberback to summary
public int getRowNumber() throws HibernateException

Implements org.hibernate.ScrollableResults.getRowNumber.

Doc from org.hibernate.ScrollableResults.getRowNumber.

Get the current location in the result set. The first row is number 0, contrary to JDBC.

Returns:int

the row number, numbered from 0, or -1 if there is no current row

isFirstback to summary
public boolean isFirst() throws HibernateException

Implements org.hibernate.ScrollableResults.isFirst.

Doc from org.hibernate.ScrollableResults.isFirst.

Is this the first result?

Returns:boolean

true if this is the first row of results

See Also
org.hibernate.ScrollableResults#isFirst()
isLastback to summary
public boolean isLast() throws HibernateException

Implements org.hibernate.ScrollableResults.isLast.

Doc from org.hibernate.ScrollableResults.isLast.

Is this the last result?

Returns:boolean

true if this is the last row of results

See Also
org.hibernate.ScrollableResults#isLast()
lastback to summary
public boolean last() throws HibernateException

Implements org.hibernate.ScrollableResults.last.

Doc from org.hibernate.ScrollableResults.last.

Go to the last result

Returns:boolean

true if there are any results

See Also
org.hibernate.ScrollableResults#last()
nextback to summary
public boolean next() throws HibernateException

Implements org.hibernate.ScrollableResults.next.

Doc from org.hibernate.ScrollableResults.next.

Advance to the next result

Returns:boolean

true if there is another result

See Also
org.hibernate.ScrollableResults#next()
prepareCurrentRowback to summary
private void prepareCurrentRow(boolean underlyingScrollSuccessful) throws HibernateException
previousback to summary
public boolean previous() throws HibernateException

Implements org.hibernate.ScrollableResults.previous.

Doc from org.hibernate.ScrollableResults.previous.

Retreat to the previous result

Returns:boolean

true if there is a previous result

See Also
org.hibernate.ScrollableResults#previous()
scrollback to summary
public boolean scroll(int i) throws HibernateException

Implements org.hibernate.ScrollableResults.scroll.

Doc from org.hibernate.ScrollableResults.scroll.

Scroll an arbitrary number of locations

Parameters
i:int

a positive (forward) or negative (backward) number of rows

Returns:boolean

true if there is a result at the new location

See Also
org.hibernate.ScrollableResults#scroll(int)
setRowNumberback to summary
public boolean setRowNumber(int rowNumber) throws HibernateException

Implements org.hibernate.ScrollableResults.setRowNumber.

Doc from org.hibernate.ScrollableResults.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:int

the row number, numbered from the last row, in the case of a negative row number

Returns:boolean

true if there is a row at that row number