Top Description Fields Constructors Methods
org.hibernate.internal

public Class ScrollableResultsImpl<R>

extends AbstractScrollableResults<R>
Class Inheritance
Imports
org.hibernate.HibernateException, org.hibernate.engine.spi.PersistenceContext, .SharedSessionContractImplementor, org.hibernate.sql.results.internal.RowProcessingStateStandardImpl, org.hibernate.sql.results.jdbc.internal.JdbcValuesSourceProcessingStateStandardImpl, org.hibernate.sql.results.jdbc.spi.JdbcValues, .JdbcValuesSourceProcessingOptions, org.hibernate.sql.results.spi.LoadContexts, .RowReader

Standard ScrollableResults implementation.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private R

Constructor Summary

AccessConstructor and Description
public
ScrollableResultsImpl(JdbcValues jdbcValues, JdbcValuesSourceProcessingOptions processingOptions, JdbcValuesSourceProcessingStateStandardImpl jdbcValuesSourceProcessingState, RowProcessingStateStandardImpl rowProcessingState, RowReader<R> rowReader, SharedSessionContractImplementor persistenceContext)

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.
public boolean
first()

Implements org.hibernate.ScrollableResults.first.

Go to the first result.
protected R
public int
getRowNumber()

Implements org.hibernate.ScrollableResults.getRowNumber.

Get the current position in the results.
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.
public boolean
position(int position)

Implements org.hibernate.ScrollableResults.position.

Moves the result cursor to the specified position.
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 the specified number of positions from the current position.
public boolean
setRowNumber(int
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.
rowNumber
)

Implements org.hibernate.ScrollableResults.setRowNumber.

Set the current position in the result set.
Inherited from org.hibernate.internal.AbstractScrollableResults:
afterScrollOperationclosegetgetJdbcValuesgetJdbcValuesSourceProcessingStategetPersistenceContextgetProcessingOptionsgetRowProcessingStategetRowReaderisClosedsetFetchSize

Field Detail

currentRowback to summary
private R currentRow

Constructor Detail

ScrollableResultsImplback to summary
public ScrollableResultsImpl(JdbcValues jdbcValues, JdbcValuesSourceProcessingOptions processingOptions, JdbcValuesSourceProcessingStateStandardImpl jdbcValuesSourceProcessingState, RowProcessingStateStandardImpl rowProcessingState, RowReader<R> rowReader, SharedSessionContractImplementor persistenceContext)

Method Detail

afterLastback to summary
public void afterLast()

Implements org.hibernate.ScrollableResults.afterLast.

Doc from org.hibernate.ScrollableResults.afterLast.

Go to a location just after the last result.

Annotations
@Override
beforeFirstback to summary
public void beforeFirst()

Implements org.hibernate.ScrollableResults.beforeFirst.

Doc from org.hibernate.ScrollableResults.beforeFirst.

Go to a location just before first result.

This is the location of the cursor on a newly returned scrollable result.

Annotations
@Override
firstback to summary
public boolean first()

Implements org.hibernate.ScrollableResults.first.

Doc from org.hibernate.ScrollableResults.first.

Go to the first result.

Returns:boolean

true if there are any results

Annotations
@Override
getCurrentRowback to summary
protected R getCurrentRow()

Implements abstract org.hibernate.internal.AbstractScrollableResults.getCurrentRow.

Annotations
@Override
getRowNumberback to summary
public int getRowNumber() throws HibernateException

Implements org.hibernate.ScrollableResults.getRowNumber.

Doc from org.hibernate.ScrollableResults.getRowNumber.

Get the current position in the results.

The first position is number 0 (unlike JDBC).

Returns:int

The current position number, numbered from 0; -1 indicates that there is no current row

Annotations
@Override
isFirstback to summary
public boolean isFirst()

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, otherwise false

Annotations
@Override
isLastback to summary
public boolean isLast()

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.

Annotations
@Override
lastback to summary
public boolean last()

Implements org.hibernate.ScrollableResults.last.

Doc from org.hibernate.ScrollableResults.last.

Go to the last result.

Returns:boolean

true if there are any results

Annotations
@Override
nextback to summary
public boolean next()

Implements org.hibernate.ScrollableResults.next.

Doc from org.hibernate.ScrollableResults.next.

Advance to the next result.

Returns:boolean

true if there is another result

Annotations
@Override
positionback to summary
public boolean position(int position)

Implements org.hibernate.ScrollableResults.position.

Doc from org.hibernate.ScrollableResults.position.

Moves the result cursor to the specified position.

Returns:boolean

true if there is a result at the new location

Annotations
@Override
prepareCurrentRowback to summary
private void prepareCurrentRow(boolean underlyingScrollSuccessful)
previousback to summary
public boolean previous()

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

Annotations
@Override
scrollback to summary
public boolean scroll(int i)

Implements org.hibernate.ScrollableResults.scroll.

Doc from org.hibernate.ScrollableResults.scroll.

Scroll the specified number of positions from the current position.

Parameters
i:int

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

Returns:boolean

true if there is a result at the new location

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

Implements org.hibernate.ScrollableResults.setRowNumber.

Doc from org.hibernate.ScrollableResults.setRowNumber.

Set the current position in the result set.

Can be numbered from the first result (positive number) or backward from the last result (negative number).

Parameters
rowNumber:int

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.

Returns:boolean

true if there is a row at that row number

Annotations
@Override