Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.impl
Class AbstractScrollableResults  view AbstractScrollableResults download AbstractScrollableResults.java

java.lang.Object
  extended byorg.hibernate.impl.AbstractScrollableResults
All Implemented Interfaces:
org.hibernate.ScrollableResults
Direct Known Subclasses:
FetchingScrollableResultsImpl, ScrollableResultsImpl

public abstract class AbstractScrollableResults
extends java.lang.Object
implements org.hibernate.ScrollableResults

Implementation of the ScrollableResults interface


Field Summary
private  org.hibernate.hql.HolderInstantiator holderInstantiator
           
private  org.hibernate.loader.Loader loader
           
private  java.sql.PreparedStatement ps
           
private  org.hibernate.engine.QueryParameters queryParameters
           
private  java.sql.ResultSet resultSet
           
private  org.hibernate.engine.SessionImplementor session
           
private  org.hibernate.type.Type[] types
           
 
Constructor Summary
AbstractScrollableResults(java.sql.ResultSet rs, java.sql.PreparedStatement ps, org.hibernate.engine.SessionImplementor sess, org.hibernate.loader.Loader loader, org.hibernate.engine.QueryParameters queryParameters, org.hibernate.type.Type[] types, org.hibernate.hql.HolderInstantiator holderInstantiator)
           
 
Method Summary
protected  void afterScrollOperation()
           
 void close()
          Release resources immediately.
 java.lang.Object[] get()
          Get the current row of results
 java.lang.Object get(int col)
          Get the ith object in the current row of results, without initializing any other results in the row.
 java.math.BigDecimal getBigDecimal(int col)
          Convenience method to read a big_decimal
 java.math.BigInteger getBigInteger(int col)
          Convenience method to read a big_integer
 byte[] getBinary(int col)
          Convenience method to read a binary
 java.sql.Blob getBlob(int col)
          Convenience method to read a blob
 java.lang.Boolean getBoolean(int col)
          Convenience method to read a boolean
 java.lang.Byte getByte(int col)
          Convenience method to read a byte
 java.util.Calendar getCalendar(int col)
          Convenience method to read a calendar or calendar_date
 java.lang.Character getCharacter(int col)
          Convenience method to read a character
 java.sql.Clob getClob(int col)
          Convenience method to read a clob
protected abstract  java.lang.Object[] getCurrentRow()
           
 java.util.Date getDate(int col)
          Convenience method to read a date, time or timestamp
 java.lang.Double getDouble(int col)
          Convenience method to read a double
protected  java.lang.Object getFinal(int col, org.hibernate.type.Type returnType)
          Check that the requested type is compatible with the result type, and return the column value.
 java.lang.Float getFloat(int col)
          Convenience method to read a float
protected  org.hibernate.hql.HolderInstantiator getHolderInstantiator()
           
 java.lang.Integer getInteger(int col)
          Convenience method to read an integer
protected  org.hibernate.loader.Loader getLoader()
           
 java.util.Locale getLocale(int col)
          Convenience method to read a locale
 java.lang.Long getLong(int col)
          Convenience method to read a long
protected  java.lang.Object getNonFinal(int col, org.hibernate.type.Type returnType)
          Check that the requested type is compatible with the result type, and return the column value.
protected  java.sql.PreparedStatement getPs()
           
protected  org.hibernate.engine.QueryParameters getQueryParameters()
           
protected  java.sql.ResultSet getResultSet()
           
protected  org.hibernate.engine.SessionImplementor getSession()
           
 java.lang.Short getShort(int col)
          Convenience method to read a short
 java.lang.String getString(int col)
          Convenience method to read a string
 java.lang.String getText(int col)
          Convenience method to read text
 java.util.TimeZone getTimeZone(int col)
          Convenience method to read a timezone
 org.hibernate.type.Type getType(int i)
          Get the type of the ith column of results
protected  org.hibernate.type.Type[] getTypes()
           
private  java.lang.Object throwInvalidColumnTypeException(int i, org.hibernate.type.Type type, org.hibernate.type.Type returnType)
           
 
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, previous, scroll, setRowNumber
 

Field Detail

resultSet

private final java.sql.ResultSet resultSet

ps

private final java.sql.PreparedStatement ps

session

private final org.hibernate.engine.SessionImplementor session

loader

private final org.hibernate.loader.Loader loader

queryParameters

private final org.hibernate.engine.QueryParameters queryParameters

types

private final org.hibernate.type.Type[] types

holderInstantiator

private org.hibernate.hql.HolderInstantiator holderInstantiator
Constructor Detail

AbstractScrollableResults

public AbstractScrollableResults(java.sql.ResultSet rs,
                                 java.sql.PreparedStatement ps,
                                 org.hibernate.engine.SessionImplementor sess,
                                 org.hibernate.loader.Loader loader,
                                 org.hibernate.engine.QueryParameters queryParameters,
                                 org.hibernate.type.Type[] types,
                                 org.hibernate.hql.HolderInstantiator holderInstantiator)
                          throws org.hibernate.MappingException
Method Detail

getCurrentRow

protected abstract java.lang.Object[] getCurrentRow()

getResultSet

protected java.sql.ResultSet getResultSet()

getPs

protected java.sql.PreparedStatement getPs()

getSession

protected org.hibernate.engine.SessionImplementor getSession()

getLoader

protected org.hibernate.loader.Loader getLoader()

getQueryParameters

protected org.hibernate.engine.QueryParameters getQueryParameters()

getTypes

protected org.hibernate.type.Type[] getTypes()

getHolderInstantiator

protected org.hibernate.hql.HolderInstantiator getHolderInstantiator()

close

public final void close()
                 throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Release resources immediately.

Specified by:
close in interface org.hibernate.ScrollableResults

get

public final java.lang.Object[] get()
                             throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Get the current row of results

Specified by:
get in interface org.hibernate.ScrollableResults

get

public final java.lang.Object get(int col)
                           throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
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).

Specified by:
get in interface org.hibernate.ScrollableResults

getFinal

protected final java.lang.Object getFinal(int col,
                                          org.hibernate.type.Type returnType)
                                   throws org.hibernate.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.


getNonFinal

protected final java.lang.Object getNonFinal(int col,
                                             org.hibernate.type.Type returnType)
                                      throws org.hibernate.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".


getBigDecimal

public final java.math.BigDecimal getBigDecimal(int col)
                                         throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a big_decimal

Specified by:
getBigDecimal in interface org.hibernate.ScrollableResults

getBigInteger

public final java.math.BigInteger getBigInteger(int col)
                                         throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a big_integer

Specified by:
getBigInteger in interface org.hibernate.ScrollableResults

getBinary

public final byte[] getBinary(int col)
                       throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a binary

Specified by:
getBinary in interface org.hibernate.ScrollableResults

getText

public final java.lang.String getText(int col)
                               throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read text

Specified by:
getText in interface org.hibernate.ScrollableResults

getBlob

public final java.sql.Blob getBlob(int col)
                            throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a blob

Specified by:
getBlob in interface org.hibernate.ScrollableResults

getClob

public final java.sql.Clob getClob(int col)
                            throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a clob

Specified by:
getClob in interface org.hibernate.ScrollableResults

getBoolean

public final java.lang.Boolean getBoolean(int col)
                                   throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a boolean

Specified by:
getBoolean in interface org.hibernate.ScrollableResults

getByte

public final java.lang.Byte getByte(int col)
                             throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a byte

Specified by:
getByte in interface org.hibernate.ScrollableResults

getCharacter

public final java.lang.Character getCharacter(int col)
                                       throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a character

Specified by:
getCharacter in interface org.hibernate.ScrollableResults

getDate

public final java.util.Date getDate(int col)
                             throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a date, time or timestamp

Specified by:
getDate in interface org.hibernate.ScrollableResults

getCalendar

public final java.util.Calendar getCalendar(int col)
                                     throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a calendar or calendar_date

Specified by:
getCalendar in interface org.hibernate.ScrollableResults

getDouble

public final java.lang.Double getDouble(int col)
                                 throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a double

Specified by:
getDouble in interface org.hibernate.ScrollableResults

getFloat

public final java.lang.Float getFloat(int col)
                               throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a float

Specified by:
getFloat in interface org.hibernate.ScrollableResults

getInteger

public final java.lang.Integer getInteger(int col)
                                   throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read an integer

Specified by:
getInteger in interface org.hibernate.ScrollableResults

getLong

public final java.lang.Long getLong(int col)
                             throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a long

Specified by:
getLong in interface org.hibernate.ScrollableResults

getShort

public final java.lang.Short getShort(int col)
                               throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a short

Specified by:
getShort in interface org.hibernate.ScrollableResults

getString

public final java.lang.String getString(int col)
                                 throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a string

Specified by:
getString in interface org.hibernate.ScrollableResults

getLocale

public final java.util.Locale getLocale(int col)
                                 throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a locale

Specified by:
getLocale in interface org.hibernate.ScrollableResults

getTimeZone

public final java.util.TimeZone getTimeZone(int col)
                                     throws org.hibernate.HibernateException
Description copied from interface: org.hibernate.ScrollableResults
Convenience method to read a timezone

Specified by:
getTimeZone in interface org.hibernate.ScrollableResults

getType

public final org.hibernate.type.Type getType(int i)
Description copied from interface: org.hibernate.ScrollableResults
Get the type of the ith column of results

Specified by:
getType in interface org.hibernate.ScrollableResults

throwInvalidColumnTypeException

private java.lang.Object throwInvalidColumnTypeException(int i,
                                                         org.hibernate.type.Type type,
                                                         org.hibernate.type.Type returnType)
                                                  throws org.hibernate.HibernateException

afterScrollOperation

protected void afterScrollOperation()