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 betweenScrollableResultsImplandFetchingScrollableResultsImpl
-
-
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 voidafterScrollOperation()voidclose()Release resources immediately.Rget()Get the current row of results.protected abstract RgetCurrentRow()protected JdbcValuesgetJdbcValues()protected JdbcValuesSourceProcessingStateStandardImplgetJdbcValuesSourceProcessingState()protected SharedSessionContractImplementorgetPersistenceContext()protected JdbcValuesSourceProcessingOptionsgetProcessingOptions()protected RowProcessingStateStandardImplgetRowProcessingState()protected RowReader<R>getRowReader()booleanisClosed()voidsetFetchSize(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:ScrollableResultsGet the current row of results.- Specified by:
getin 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:ScrollableResultsGives 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:
setFetchSizein interfaceScrollableResults<R>- See Also:
ResultSet.setFetchSize(int),AvailableSettings.STATEMENT_FETCH_SIZE
-
close
public final void close()
Description copied from interface:ScrollableResultsRelease resources immediately.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceScrollableResults<R>
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceScrollableResultsImplementor<R>
-
-