Top Description Fields Constructors Methods
org.hibernate.impl

public abstract Class AbstractScrollableResults

extends Object
implements ScrollableResults
Class Inheritance
All Implemented Interfaces
org.hibernate.ScrollableResults
Known Direct Subclasses
org.hibernate.impl.FetchingScrollableResultsImpl, org.hibernate.impl.ScrollableResultsImpl
Imports
java.math.BigDecimal, .BigInteger, java.sql.Blob, .Clob, .PreparedStatement, .ResultSet, .SQLException, java.util.Calendar, .Date, .Locale, .TimeZone, org.slf4j.Logger, .LoggerFactory, org.hibernate.Hibernate, .HibernateException, .MappingException, .ScrollableResults, org.hibernate.engine.QueryParameters, .SessionImplementor, org.hibernate.exception.JDBCExceptionHelper, org.hibernate.hql.HolderInstantiator, org.hibernate.loader.Loader, org.hibernate.type.Type

Implementation of the ScrollableResults interface
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private HolderInstantiator
private final Loader
private static final Logger
private final PreparedStatement
private final QueryParameters
private final ResultSet
private final SessionImplementor
private final Type[]

Constructor Summary

AccessConstructor and Description
public
AbstractScrollableResults(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator)

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 col)

Implements org.hibernate.ScrollableResults.getBigDecimal.

Convenience method to read a big_decimal
public final BigInteger
getBigInteger(int col)

Implements org.hibernate.ScrollableResults.getBigInteger.

Convenience method to read a big_integer
public final byte[]
getBinary(int col)

Implements org.hibernate.ScrollableResults.getBinary.

Convenience method to read a binary
public final Blob
getBlob(int col)

Implements org.hibernate.ScrollableResults.getBlob.

Convenience method to read a blob
public final Boolean
getBoolean(int col)

Implements org.hibernate.ScrollableResults.getBoolean.

Convenience method to read a boolean
public final Byte
getByte(int col)

Implements org.hibernate.ScrollableResults.getByte.

Convenience method to read a byte
public final Calendar
getCalendar(int col)

Implements org.hibernate.ScrollableResults.getCalendar.

Convenience method to read a calendar or calendar_date
public final Character
getCharacter(int col)

Implements org.hibernate.ScrollableResults.getCharacter.

Convenience method to read a character
public final Clob
getClob(int col)

Implements org.hibernate.ScrollableResults.getClob.

Convenience method to read a clob
protected abstract Object[]
public final Date
getDate(int col)

Implements org.hibernate.ScrollableResults.getDate.

Convenience method to read a date, time or timestamp
public final Double
getDouble(int 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 col)

Implements org.hibernate.ScrollableResults.getFloat.

Convenience method to read a float
protected HolderInstantiator
public final Integer
getInteger(int col)

Implements org.hibernate.ScrollableResults.getInteger.

Convenience method to read an integer
protected Loader
public final Locale
getLocale(int col)

Implements org.hibernate.ScrollableResults.getLocale.

Convenience method to read a locale
public final Long
getLong(int 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.

protected PreparedStatement
protected QueryParameters
protected ResultSet
protected SessionImplementor
public final Short
getShort(int col)

Implements org.hibernate.ScrollableResults.getShort.

Convenience method to read a short
public final String
getString(int col)

Implements org.hibernate.ScrollableResults.getString.

Convenience method to read a string
public final String
getText(int col)

Implements org.hibernate.ScrollableResults.getText.

Convenience method to read text
public final TimeZone
getTimeZone(int 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[]
private Object
throwInvalidColumnTypeException(int i, Type type, Type returnType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

holderInstantiatorback to summary
private HolderInstantiator holderInstantiator
loaderback to summary
private final Loader loader
logback to summary
private static final Logger 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 SessionImplementor session
typesback to summary
private final Type[] types

Constructor Detail

AbstractScrollableResultsback to summary
public AbstractScrollableResults(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator) throws MappingException

Method Detail

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

Implements org.hibernate.ScrollableResults.close.

Doc from org.hibernate.ScrollableResults.close.

Release resources immediately.

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[]

an object or array

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

an object of any Hibernate type or null

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 big_decimal

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 big_integer

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

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

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

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

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 or calendar_date

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 character

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

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, time or timestamp

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

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

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

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

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

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

getPsback to summary
protected PreparedStatement getPs()
getQueryParametersback to summary
protected QueryParameters getQueryParameters()
getResultSetback to summary
protected ResultSet getResultSet()
getSessionback to summary
protected SessionImplementor 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

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

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 text

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

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

getTypesback to summary
protected Type[] getTypes()
throwInvalidColumnTypeExceptionback to summary
private Object throwInvalidColumnTypeException(int i, Type type, Type returnType) throws HibernateException