Top Description Fields Constructors Methods
org.hibernate.internal

public Class FetchingScrollableResultsImpl<R>

extends AbstractScrollableResults<R>
Class Inheritance
Imports
org.hibernate.HibernateException, org.hibernate.engine.spi.EntityKey, .PersistenceContext, .SharedSessionContractImplementor, org.hibernate.sql.results.graph.Initializer, org.hibernate.sql.results.graph.entity.EntityInitializer, 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

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

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private int
private R
private Integer
private final EntityInitializer

Constructor Summary

AccessConstructor and Description
public
FetchingScrollableResultsImpl(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.
private static <R> EntityInitializer
public boolean
first()

Implements org.hibernate.ScrollableResults.first.

Go to the first result.
protected R
private EntityKey
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?
private boolean
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 boolean
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
positions
)

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

afterLastback to summary
private boolean afterLast
beforeFirstback to summary
private boolean beforeFirst
currentPositionback to summary
private int currentPosition
currentRowback to summary
private R currentRow
maxPositionback to summary
private Integer maxPosition
resultInitializerback to summary
private final EntityInitializer resultInitializer

Constructor Detail

FetchingScrollableResultsImplback to summary
public FetchingScrollableResultsImpl(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
extractResultInitializerback to summary
private static <R> EntityInitializer extractResultInitializer(RowReader<R> rowReader)
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
getEntityKeyback to summary
private EntityKey getEntityKey()
getRowNumberback to summary
public int getRowNumber()

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
isResultSetEmptyback to summary
private boolean isResultSetEmpty()
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 boolean prepareCurrentRow()
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 positions)

Implements org.hibernate.ScrollableResults.scroll.

Doc from org.hibernate.ScrollableResults.scroll.

Scroll the specified number of positions from the current position.

Parameters
positions: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)

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