Top Description Fields Constructors Methods
org.hibernate.impl

public Class FetchingScrollableResultsImpl

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

Implementation of ScrollableResults which can handle collection fetches.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private int
private Object[]
private Integer

Constructor Summary

AccessConstructor and Description
public

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

Returns:

true if there are any results
first
()

Implements org.hibernate.ScrollableResults.first.

Go to the first result
protected Object[]
public int

Returns:

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

Implements org.hibernate.ScrollableResults.getRowNumber.

Get the current location in the result set.
public boolean

Returns:

true if this is the first row of results
isFirst
()

Implements org.hibernate.ScrollableResults.isFirst.

Is this the first result?
public boolean

Returns:

true if this is the last row of results
isLast
()

Implements org.hibernate.ScrollableResults.isLast.

Is this the last result?
private boolean
public boolean

Returns:

true if there are any results
last
()

Implements org.hibernate.ScrollableResults.last.

Go to the last result
public boolean

Returns:

true if there is another result
next
()

Implements org.hibernate.ScrollableResults.next.

Advance to the next result
public boolean

Returns:

true if there is a previous result
previous
()

Implements org.hibernate.ScrollableResults.previous.

Retreat to the previous result
public boolean

Returns:

true if there is a result at the new location
scroll
(int
a positive (forward) or negative (backward) number of rows
positions
)

Implements org.hibernate.ScrollableResults.scroll.

Scroll an arbitrary number of locations
public boolean

Returns:

true if there is a row at that row number
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

currentPositionback to summary
private int currentPosition
currentRowback to summary
private Object[] currentRow
maxPositionback to summary
private Integer maxPosition

Constructor Detail

FetchingScrollableResultsImplback to summary
public FetchingScrollableResultsImpl(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.

Go to a location just after the last result

beforeFirstback to summary
public void beforeFirst() throws HibernateException

Implements org.hibernate.ScrollableResults.beforeFirst.

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

firstback to summary
public boolean first() throws HibernateException

Implements org.hibernate.ScrollableResults.first.

Go to the first result

Returns:boolean

true if there are any results

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.

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.

Is this the first result?

Returns:boolean

true if this is the first row of results

isLastback to summary
public boolean isLast() throws HibernateException

Implements org.hibernate.ScrollableResults.isLast.

Is this the last result?

Returns:boolean

true if this is the last row of results

isResultSetEmptyback to summary
private boolean isResultSetEmpty()
lastback to summary
public boolean last() throws HibernateException

Implements org.hibernate.ScrollableResults.last.

Go to the last result

Returns:boolean

true if there are any results

nextback to summary
public boolean next() throws HibernateException

Implements org.hibernate.ScrollableResults.next.

Advance to the next result

Returns:boolean

true if there is another result

previousback to summary
public boolean previous() throws HibernateException

Implements org.hibernate.ScrollableResults.previous.

Retreat to the previous result

Returns:boolean

true if there is a previous result

scrollback to summary
public boolean scroll(int positions) throws HibernateException

Implements org.hibernate.ScrollableResults.scroll.

Scroll an arbitrary number of locations

Parameters
positions:int

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

Returns:boolean

true if there is a result at the new location

setRowNumberback to summary
public boolean setRowNumber(int rowNumber) throws HibernateException

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).

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