Package org.hibernate.internal
Class AbstractScrollableResults<R>
- java.lang.Object
-
- org.hibernate.internal.AbstractScrollableResults<R>
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ScrollableResultsImplementor<R>
,ScrollableResults<R>
- Direct Known Subclasses:
FetchingScrollableResultsImpl
,ScrollableResultsImpl
public abstract class AbstractScrollableResults<R> extends Object implements ScrollableResultsImplementor<R>
Base implementation of the ScrollableResults interface intended for sharing betweenScrollableResultsImpl
andFetchingScrollableResultsImpl
-
-
Constructor Summary
Constructors Constructor Description AbstractScrollableResults(JdbcValues jdbcValues, JdbcValuesSourceProcessingOptions processingOptions, JdbcValuesSourceProcessingStateStandardImpl jdbcValuesSourceProcessingState, RowProcessingStateStandardImpl rowProcessingState, RowReader<R> rowReader, SharedSessionContractImplementor persistenceContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
afterScrollOperation()
void
close()
Release resources immediately.R
get()
Get the current row of results.protected abstract R
getCurrentRow()
protected JdbcValues
getJdbcValues()
protected JdbcValuesSourceProcessingStateStandardImpl
getJdbcValuesSourceProcessingState()
protected SharedSessionContractImplementor
getPersistenceContext()
protected JdbcValuesSourceProcessingOptions
getProcessingOptions()
protected RowProcessingStateStandardImpl
getRowProcessingState()
protected RowReader<R>
getRowReader()
boolean
isClosed()
void
setFetchSize(int fetchSize)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.ScrollableResults
afterLast, beforeFirst, first, getRowNumber, isFirst, isLast, last, next, position, previous, scroll, setRowNumber
-
-
-
-
Constructor Detail
-
AbstractScrollableResults
public AbstractScrollableResults(JdbcValues jdbcValues, JdbcValuesSourceProcessingOptions processingOptions, JdbcValuesSourceProcessingStateStandardImpl jdbcValuesSourceProcessingState, RowProcessingStateStandardImpl rowProcessingState, RowReader<R> rowReader, SharedSessionContractImplementor persistenceContext)
-
-
Method Detail
-
get
public final R get() throws HibernateException
Description copied from interface:ScrollableResults
Get the current row of results.- Specified by:
get
in interfaceScrollableResults<R>
- Returns:
- The array of results
- Throws:
HibernateException
-
getCurrentRow
protected abstract R getCurrentRow()
-
getJdbcValues
protected JdbcValues getJdbcValues()
-
getProcessingOptions
protected JdbcValuesSourceProcessingOptions getProcessingOptions()
-
getJdbcValuesSourceProcessingState
protected JdbcValuesSourceProcessingStateStandardImpl getJdbcValuesSourceProcessingState()
-
getRowProcessingState
protected RowProcessingStateStandardImpl getRowProcessingState()
-
getPersistenceContext
protected SharedSessionContractImplementor getPersistenceContext()
-
afterScrollOperation
protected void afterScrollOperation()
-
setFetchSize
public void setFetchSize(int fetchSize)
Description copied from interface:ScrollableResults
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. If0
, the JDBC driver's default setting will be used.- Specified by:
setFetchSize
in interfaceScrollableResults<R>
- See Also:
ResultSet.setFetchSize(int)
,AvailableSettings.STATEMENT_FETCH_SIZE
-
close
public final void close()
Description copied from interface:ScrollableResults
Release resources immediately.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceScrollableResults<R>
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceScrollableResultsImplementor<R>
-
-