Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.impl
Class AbstractScrollableResults

    java.lang.Object
      org.hibernate.impl.AbstractScrollableResults

All Implemented Interfaces:
  ScrollableResults

Direct Known Subclasses:
  FetchingScrollableResultsImpl, ScrollableResultsImpl

    public abstract class AbstractScrollableResults

extends Object
implements ScrollableResults

Implementation of the `ScrollableResults` interface

Author:
  Steve Ebersole

Constructor Summary
`AbstractScrollableResults(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator)`

Method Summary
`protected void` | `afterScrollOperation()`
`void` | `close()` Release resources immediately.
`Object[]` | `get()` Get the current row of results
`Object` | `get(int col)` Get the `i`th object in the current row of results, without initializing any other results in the row.
`BigDecimal` | `getBigDecimal(int col)` Convenience method to read a `big_decimal`
`BigInteger` | `getBigInteger(int col)` Convenience method to read a `big_integer`
`byte[]` | `getBinary(int col)` Convenience method to read a `binary`
`Blob` | `getBlob(int col)` Convenience method to read a `blob`
`Boolean` | `getBoolean(int col)` Convenience method to read a `boolean`
`Byte` | `getByte(int col)` Convenience method to read a `byte`
`Calendar` | `getCalendar(int col)` Convenience method to read a `calendar` or `calendar_date`
`Character` | `getCharacter(int col)` Convenience method to read a `character`
`Clob` | `getClob(int col)` Convenience method to read a `clob`
`protected abstract Object[]` | `getCurrentRow()`
`Date` | `getDate(int col)` Convenience method to read a `date`, `time` or `timestamp`
`Double` | `getDouble(int col)` Convenience method to read a `double`
`protected Object` | `getFinal(int col, Type returnType)` Check that the requested type is compatible with the result type, and return the column value.
`Float` | `getFloat(int col)` Convenience method to read a `float`
`protected HolderInstantiator` | `getHolderInstantiator()`
`Integer` | `getInteger(int col)` Convenience method to read an `integer`
`protected Loader` | `getLoader()`
`Locale` | `getLocale(int col)` Convenience method to read a `locale`
`Long` | `getLong(int col)` Convenience method to read a `long`
`protected Object` | `getNonFinal(int col, Type returnType)` Check that the requested type is compatible with the result type, and return the column value.
`protected PreparedStatement` | `getPs()`
`protected QueryParameters` | `getQueryParameters()`
`protected ResultSet` | `getResultSet()`
`protected SessionImplementor` | `getSession()`
`Short` | `getShort(int col)` Convenience method to read a `short`
`String` | `getString(int col)` Convenience method to read a `string`
`String` | `getText(int col)` Convenience method to read `text`
`TimeZone` | `getTimeZone(int col)` Convenience method to read a `timezone`
`Type` | `getType(int i)` Get the type of the `i`th column of results
`protected Type[]` | `getTypes()`

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`

Constructor Detail

### AbstractScrollableResults

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

Throws:
  `MappingException`

Method Detail

### getCurrentRow

    protected abstract Object[] getCurrentRow()

### getResultSet

    protected ResultSet getResultSet()

### getPs

    protected PreparedStatement getPs()

### getSession

    protected SessionImplementor getSession()

### getLoader

    protected Loader getLoader()

### getQueryParameters

    protected QueryParameters getQueryParameters()

### getTypes

    protected Type[] getTypes()

### getHolderInstantiator

    protected HolderInstantiator getHolderInstantiator()

### close

    public final void close()
                     throws HibernateException

  Description copied from interface: `ScrollableResults`
  Release resources immediately.

  Specified by:
    `close` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### get

    public final Object[] get()
                       throws HibernateException

  Description copied from interface: `ScrollableResults`
  Get the current row of results

  Specified by:
    `get` in interface `ScrollableResults`
  Returns:
    an object or array
  Throws:
    `HibernateException`

### get

    public final Object get(int col)
                     throws HibernateException

  Description copied from interface: `ScrollableResults`
  Get the `i`th 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 `ScrollableResults`
  Parameters:
    `col` - the column, numbered from zero
  Returns:
    an object of any Hibernate type or `null`
  Throws:
    `HibernateException`

### getFinal

    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` - the column
    `returnType` - a "final" type
  Throws:
    `HibernateException`

### getNonFinal

    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` - the column
    `returnType` - any type
  Throws:
    `HibernateException`

### getBigDecimal

    public final BigDecimal getBigDecimal(int col)
                                   throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `big_decimal`

  Specified by:
    `getBigDecimal` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getBigInteger

    public final BigInteger getBigInteger(int col)
                                   throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `big_integer`

  Specified by:
    `getBigInteger` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getBinary

    public final byte[] getBinary(int col)
                           throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `binary`

  Specified by:
    `getBinary` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getText

    public final String getText(int col)
                         throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read `text`

  Specified by:
    `getText` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getBlob

    public final Blob getBlob(int col)
                       throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `blob`

  Specified by:
    `getBlob` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getClob

    public final Clob getClob(int col)
                       throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `clob`

  Specified by:
    `getClob` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getBoolean

    public final Boolean getBoolean(int col)
                             throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `boolean`

  Specified by:
    `getBoolean` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getByte

    public final Byte getByte(int col)
                       throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `byte`

  Specified by:
    `getByte` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getCharacter

    public final Character getCharacter(int col)
                                 throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `character`

  Specified by:
    `getCharacter` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getDate

    public final Date getDate(int col)
                       throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `date`, `time` or `timestamp`

  Specified by:
    `getDate` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getCalendar

    public final Calendar getCalendar(int col)
                               throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `calendar` or `calendar_date`

  Specified by:
    `getCalendar` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getDouble

    public final Double getDouble(int col)
                           throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `double`

  Specified by:
    `getDouble` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getFloat

    public final Float getFloat(int col)
                         throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `float`

  Specified by:
    `getFloat` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getInteger

    public final Integer getInteger(int col)
                             throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read an `integer`

  Specified by:
    `getInteger` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getLong

    public final Long getLong(int col)
                       throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `long`

  Specified by:
    `getLong` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getShort

    public final Short getShort(int col)
                         throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `short`

  Specified by:
    `getShort` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getString

    public final String getString(int col)
                           throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `string`

  Specified by:
    `getString` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getLocale

    public final Locale getLocale(int col)
                           throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `locale`

  Specified by:
    `getLocale` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getTimeZone

    public final TimeZone getTimeZone(int col)
                               throws HibernateException

  Description copied from interface: `ScrollableResults`
  Convenience method to read a `timezone`

  Specified by:
    `getTimeZone` in interface `ScrollableResults`
  Throws:
    `HibernateException`

### getType

    public final Type getType(int i)

  Description copied from interface: `ScrollableResults`
  Get the type of the `i`th column of results

  Specified by:
    `getType` in interface `ScrollableResults`
  Parameters:
    `i` - the column, numbered from zero
  Returns:
    the Hibernate type

### afterScrollOperation

    protected void afterScrollOperation()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.