Top Description Fields Constructors Methods
org.hibernate.internal

public abstract Class AbstractScrollableResults

extends Object
implements ScrollableResultsImplementor
Class Inheritance
All Implemented Interfaces
org.hibernate.query.spi.ScrollableResultsImplementor, org.hibernate.ScrollableResults, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
org.hibernate.internal.FetchingScrollableResultsImpl, org.hibernate.internal.ScrollableResultsImpl
Imports
java.math.BigDecimal, .BigInteger, java.sql.Blob, .Clob, .PreparedStatement, .ResultSet, java.util.Calendar, .Date, .Locale, .TimeZone, org.hibernate.HibernateException, org.hibernate.engine.jdbc.spi.JdbcCoordinator, org.hibernate.engine.spi.QueryParameters, .SharedSessionContractImplementor, org.hibernate.hql.internal.HolderInstantiator, org.hibernate.loader.Loader, org.hibernate.query.spi.ScrollableResultsImplementor, org.hibernate.type.StandardBasicTypes, .Type

Base implementation of the ScrollableResults interface.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private boolean
private HolderInstantiator
private final Loader
private static final CoreMessageLogger
private final PreparedStatement
private final QueryParameters
private final ResultSet
private final SharedSessionContractImplementor
private final Type[]

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected void
public final void
close()

Implements org.hibernate.ScrollableResults.close.

Release resources immediately.
public final Object[]
get()

Implements org.hibernate.ScrollableResults.get.

Get the current row of results.
public final Object
get(int
the column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.get.

Get the ith object in the current row of results, without initializing any other results in the row.
public final BigDecimal
getBigDecimal(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getBigDecimal.

Convenience method to read a BigDecimal.
public final BigInteger
getBigInteger(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getBigInteger.

Convenience method to read a BigInteger.
public final byte[]
getBinary(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getBinary.

Convenience method to read a binary (byte[]).
public final Blob
getBlob(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getBlob.

Convenience method to read a blob.
public final Boolean
getBoolean(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getBoolean.

Convenience method to read a boolean.
public final Byte
getByte(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getByte.

Convenience method to read a byte.
public final Calendar
getCalendar(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getCalendar.

Convenience method to read a Calendar.
public final Character
getCharacter(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getCharacter.

Convenience method to read a char.
public final Clob
getClob(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getClob.

Convenience method to read a clob.
protected abstract Object[]
public final Date
getDate(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getDate.

Convenience method to read a Date.
public final Double
getDouble(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getDouble.

Convenience method to read a double.
protected final Object
getFinal(int
the column
col
,
Type
a "final" type
returnType
)

Check that the requested type is compatible with the result type, and return the column value.

public final Float
getFloat(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getFloat.

Convenience method to read a float.
protected HolderInstantiator
public final Integer
getInteger(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getInteger.

Convenience method to read an integer.
protected Loader
public final Locale
getLocale(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getLocale.

Convenience method to read a Locale.
public final Long
getLong(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getLong.

Convenience method to read a long.
protected final Object
getNonFinal(int
the column
col
,
Type
any type
returnType
)

Check that the requested type is compatible with the result type, and return the column value.

public int
protected PreparedStatement
protected QueryParameters
protected ResultSet
protected SharedSessionContractImplementor
public final Short
getShort(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getShort.

Convenience method to read a short.
public final String
getString(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getString.

Convenience method to read a string.
public final String
getText(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getText.

Convenience method to read a String using streaming.
public final TimeZone
getTimeZone(int
The column, numbered from zero
col
)

Implements org.hibernate.ScrollableResults.getTimeZone.

Convenience method to read a TimeZone.
public final Type
getType(int
the column, numbered from zero
i
)

Implements org.hibernate.ScrollableResults.getType.

Get the type of the ith column of results.
protected Type[]
public boolean
private Object
throwInvalidColumnTypeException(int i, Type type, Type returnType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closedback to summary
private boolean closed
holderInstantiatorback to summary
private HolderInstantiator holderInstantiator
loaderback to summary
private final Loader loader
LOGback to summary
private static final CoreMessageLogger LOG
psback to summary
private final PreparedStatement ps
queryParametersback to summary
private final QueryParameters queryParameters
resultSetback to summary
private final ResultSet resultSet
sessionback to summary
private final SharedSessionContractImplementor session
typesback to summary
private final Type[] types

Constructor Detail

AbstractScrollableResultsback to summary
protected AbstractScrollableResults(ResultSet rs, PreparedStatement ps, SharedSessionContractImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator)

Method Detail

afterScrollOperationback to summary
protected void afterScrollOperation()
closeback to summary
public final void close()

Implements org.hibernate.ScrollableResults.close.

Doc from org.hibernate.ScrollableResults.close.

Release resources immediately.

Annotations
@Override
getback to summary
public final Object[] get() throws HibernateException

Implements org.hibernate.ScrollableResults.get.

Doc from org.hibernate.ScrollableResults.get.

Get the current row of results.

Returns:Object[]

The array of results

Annotations
@Override
getback to summary
public final Object get(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.get.

Doc from org.hibernate.ScrollableResults.get.

Get the ith object in the current row of results, without initializing any other results in the row. This method may be used safely, regardless of the type of the column (ie. even for scalar results).

Parameters
col:int

the column, numbered from zero

Returns:Object

The requested result object; may return null

Annotations
@Override
getBigDecimalback to summary
public final BigDecimal getBigDecimal(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getBigDecimal.

Doc from org.hibernate.ScrollableResults.getBigDecimal.

Convenience method to read a BigDecimal.

Parameters
col:int

The column, numbered from zero

Returns:BigDecimal

The column value as a BigDecimal

Annotations
@Override
getBigIntegerback to summary
public final BigInteger getBigInteger(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getBigInteger.

Doc from org.hibernate.ScrollableResults.getBigInteger.

Convenience method to read a BigInteger.

Parameters
col:int

The column, numbered from zero

Returns:BigInteger

The column value as a BigInteger

Annotations
@Override
getBinaryback to summary
public final byte[] getBinary(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getBinary.

Doc from org.hibernate.ScrollableResults.getBinary.

Convenience method to read a binary (byte[]).

Parameters
col:int

The column, numbered from zero

Returns:byte[]

The column value as a binary (byte[])

Annotations
@Override
getBlobback to summary
public final Blob getBlob(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getBlob.

Doc from org.hibernate.ScrollableResults.getBlob.

Convenience method to read a blob.

Parameters
col:int

The column, numbered from zero

Returns:Blob

The column value as a Blob

Annotations
@Override
getBooleanback to summary
public final Boolean getBoolean(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getBoolean.

Doc from org.hibernate.ScrollableResults.getBoolean.

Convenience method to read a boolean.

Parameters
col:int

The column, numbered from zero

Returns:Boolean

The column value as a boolean

Annotations
@Override
getByteback to summary
public final Byte getByte(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getByte.

Doc from org.hibernate.ScrollableResults.getByte.

Convenience method to read a byte.

Parameters
col:int

The column, numbered from zero

Returns:Byte

The column value as a byte

Annotations
@Override
getCalendarback to summary
public final Calendar getCalendar(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getCalendar.

Doc from org.hibernate.ScrollableResults.getCalendar.

Convenience method to read a Calendar.

Parameters
col:int

The column, numbered from zero

Returns:Calendar

The column value as a Calendar

Annotations
@Override
getCharacterback to summary
public final Character getCharacter(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getCharacter.

Doc from org.hibernate.ScrollableResults.getCharacter.

Convenience method to read a char.

Parameters
col:int

The column, numbered from zero

Returns:Character

The column value as a char

Annotations
@Override
getClobback to summary
public final Clob getClob(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getClob.

Doc from org.hibernate.ScrollableResults.getClob.

Convenience method to read a clob.

Parameters
col:int

The column, numbered from zero

Returns:Clob

The column value as a Clob

Annotations
@Override
getCurrentRowback to summary
protected abstract Object[] getCurrentRow()
getDateback to summary
public final Date getDate(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getDate.

Doc from org.hibernate.ScrollableResults.getDate.

Convenience method to read a Date.

Parameters
col:int

The column, numbered from zero

Returns:Date

The column value as a Date

Annotations
@Override
getDoubleback to summary
public final Double getDouble(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getDouble.

Doc from org.hibernate.ScrollableResults.getDouble.

Convenience method to read a double.

Parameters
col:int

The column, numbered from zero

Returns:Double

The column value as a double

Annotations
@Override
getFinalback to summary
protected final Object getFinal(int col, Type returnType) throws HibernateException

Check that the requested type is compatible with the result type, and return the column value. This version makes sure the the classes are identical.

Parameters
col:int

the column

returnType:Type

a "final" type

getFloatback to summary
public final Float getFloat(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getFloat.

Doc from org.hibernate.ScrollableResults.getFloat.

Convenience method to read a float.

Parameters
col:int

The column, numbered from zero

Returns:Float

The column value as a float

Annotations
@Override
getHolderInstantiatorback to summary
protected HolderInstantiator getHolderInstantiator()
getIntegerback to summary
public final Integer getInteger(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getInteger.

Doc from org.hibernate.ScrollableResults.getInteger.

Convenience method to read an integer.

Parameters
col:int

The column, numbered from zero

Returns:Integer

The column value as an integer

Annotations
@Override
getLoaderback to summary
protected Loader getLoader()
getLocaleback to summary
public final Locale getLocale(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getLocale.

Doc from org.hibernate.ScrollableResults.getLocale.

Convenience method to read a Locale.

Parameters
col:int

The column, numbered from zero

Returns:Locale

The column value as a Locale

Annotations
@Override
getLongback to summary
public final Long getLong(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getLong.

Doc from org.hibernate.ScrollableResults.getLong.

Convenience method to read a long.

Parameters
col:int

The column, numbered from zero

Returns:Long

The column value as a long

Annotations
@Override
getNonFinalback to summary
protected final Object getNonFinal(int col, Type returnType) throws HibernateException

Check that the requested type is compatible with the result type, and return the column value. This version makes sure the the classes are "assignable".

Parameters
col:int

the column

returnType:Type

any type

getNumberOfTypesback to summary
public int getNumberOfTypes()

Implements org.hibernate.query.spi.ScrollableResultsImplementor.getNumberOfTypes.

Annotations
@Override
getPsback to summary
protected PreparedStatement getPs()
getQueryParametersback to summary
protected QueryParameters getQueryParameters()
getResultSetback to summary
protected ResultSet getResultSet()
getSessionback to summary
protected SharedSessionContractImplementor getSession()
getShortback to summary
public final Short getShort(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getShort.

Doc from org.hibernate.ScrollableResults.getShort.

Convenience method to read a short.

Parameters
col:int

The column, numbered from zero

Returns:Short

The column value as a short

Annotations
@Override
getStringback to summary
public final String getString(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getString.

Doc from org.hibernate.ScrollableResults.getString.

Convenience method to read a string.

Parameters
col:int

The column, numbered from zero

Returns:String

The column value as a String

Annotations
@Override
getTextback to summary
public final String getText(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getText.

Doc from org.hibernate.ScrollableResults.getText.

Convenience method to read a String using streaming.

Parameters
col:int

The column, numbered from zero

Returns:String

The column value as a String

Annotations
@Override
getTimeZoneback to summary
public final TimeZone getTimeZone(int col) throws HibernateException

Implements org.hibernate.ScrollableResults.getTimeZone.

Doc from org.hibernate.ScrollableResults.getTimeZone.

Convenience method to read a TimeZone.

Parameters
col:int

The column, numbered from zero

Returns:TimeZone

The column value as a TimeZone

Annotations
@Override
getTypeback to summary
public final Type getType(int i)

Implements org.hibernate.ScrollableResults.getType.

Doc from org.hibernate.ScrollableResults.getType.

Get the type of the ith column of results.

Parameters
i:int

the column, numbered from zero

Returns:Type

the Hibernate type

Annotations
@Override
getTypesback to summary
protected Type[] getTypes()
isClosedback to summary
public boolean isClosed()

Implements org.hibernate.query.spi.ScrollableResultsImplementor.isClosed.

Annotations
@Override
throwInvalidColumnTypeExceptionback to summary
private Object throwInvalidColumnTypeException(int i, Type type, Type returnType) throws HibernateException