ScrollableResultsImpl (Hibernate JavaDocs)
Date: 2012-04-05

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.internal
Class ScrollableResultsImpl

    java.lang.Object
      org.hibernate.internal.AbstractScrollableResults
          org.hibernate.internal.ScrollableResultsImpl

All Implemented Interfaces:
  ScrollableResults

    public class ScrollableResultsImpl

extends AbstractScrollableResults
implements ScrollableResults

Implementation of the `ScrollableResults` interface

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

Method Summary
`void` | `afterLast()` Go to a location just after the last result
`void` | `beforeFirst()` Go to a location just before first result (this is the initial location)
`boolean` | `first()` Go to the first result
`protected Object[]` | `getCurrentRow()`
`int` | `getRowNumber()` Get the current location in the result set.
`boolean` | `isFirst()` Is this the first result?
`boolean` | `isLast()` Is this the last result?
`boolean` | `last()` Go to the last result
`boolean` | `next()` Advance to the next result
`boolean` | `previous()` Retreat to the previous result
`boolean` | `scroll(int i)` Scroll an arbitrary number of locations
`boolean` | `setRowNumber(int rowNumber)` Set the current location in the result set, numbered from either the first row (row number `0`), or the last row (row number `-1`).

Methods inherited from class org.hibernate.internal.AbstractScrollableResults
`afterScrollOperation, close, get, get, getBigDecimal, getBigInteger, getBinary, getBlob, getBoolean, getByte, getCalendar, getCharacter, getClob, getDate, getDouble, getFinal, getFloat, getHolderInstantiator, getInteger, getLoader, getLocale, getLong, getNonFinal, getPs, getQueryParameters, getResultSet, getSession, getShort, getString, getText, getTimeZone, getType, 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
`close, get, get, getBigDecimal, getBigInteger, getBinary, getBlob, getBoolean, getByte, getCalendar, getCharacter, getClob, getDate, getDouble, getFloat, getInteger, getLocale, getLong, getShort, getString, getText, getTimeZone, getType`

Constructor Detail

### ScrollableResultsImpl

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

Throws:
  `MappingException`

Method Detail

### getCurrentRow

    protected Object[] getCurrentRow()

  Specified by:
    `getCurrentRow` in class `AbstractScrollableResults`

### scroll

    public boolean scroll(int i)
                   throws HibernateException

  Description copied from interface: `ScrollableResults`
  Scroll an arbitrary number of locations

  Specified by:
    `scroll` in interface `ScrollableResults`
  Parameters:
    `i` - a positive (forward) or negative (backward) number of rows
  Returns:
    `true` if there is a result at the new location
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.scroll(int)`

### first

    public boolean first()
                  throws HibernateException

  Description copied from interface: `ScrollableResults`
  Go to the first result

  Specified by:
    `first` in interface `ScrollableResults`
  Returns:
    `true` if there are any results
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.first()`

### last

    public boolean last()
                 throws HibernateException

  Description copied from interface: `ScrollableResults`
  Go to the last result

  Specified by:
    `last` in interface `ScrollableResults`
  Returns:
    `true` if there are any results
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.last()`

### next

    public boolean next()
                 throws HibernateException

  Description copied from interface: `ScrollableResults`
  Advance to the next result

  Specified by:
    `next` in interface `ScrollableResults`
  Returns:
    `true` if there is another result
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.next()`

### previous

    public boolean previous()
                     throws HibernateException

  Description copied from interface: `ScrollableResults`
  Retreat to the previous result

  Specified by:
    `previous` in interface `ScrollableResults`
  Returns:
    `true` if there is a previous result
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.previous()`

### afterLast

    public void afterLast()
                   throws HibernateException

  Description copied from interface: `ScrollableResults`
  Go to a location just after the last result

  Specified by:
    `afterLast` in interface `ScrollableResults`
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.afterLast()`

### beforeFirst

    public void beforeFirst()
                     throws HibernateException

  Description copied from interface: `ScrollableResults`
  Go to a location just before first result (this is the initial location)

  Specified by:
    `beforeFirst` in interface `ScrollableResults`
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.beforeFirst()`

### isFirst

    public boolean isFirst()
                    throws HibernateException

  Description copied from interface: `ScrollableResults`
  Is this the first result?

  Specified by:
    `isFirst` in interface `ScrollableResults`
  Returns:
    `true` if this is the first row of results
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.isFirst()`

### isLast

    public boolean isLast()
                   throws HibernateException

  Description copied from interface: `ScrollableResults`
  Is this the last result?

  Specified by:
    `isLast` in interface `ScrollableResults`
  Returns:
    `true` if this is the last row of results
  Throws:
    `HibernateException`
  See Also:
    `ScrollableResults.isLast()`

### getRowNumber

    public int getRowNumber()
                     throws HibernateException

  Description copied from interface: `ScrollableResults`
  Get the current location in the result set. The first row is number `0`, contrary to JDBC.

  Specified by:
    `getRowNumber` in interface `ScrollableResults`
  Returns:
    the row number, numbered from `0`, or `-1` if there is no current row
  Throws:
    `HibernateException`

### setRowNumber

    public boolean setRowNumber(int rowNumber)
                         throws HibernateException

  Description copied from interface: `ScrollableResults`
  Set the current location in the result set, numbered from either the first row (row number `0`), or the last row (row number `-1`).

  Specified by:
    `setRowNumber` in interface `ScrollableResults`
  Parameters:
    `rowNumber` - the row number, numbered from the last row, in the case of a negative row number
  Returns:
    true if there is a row at that row number
  Throws:
    `HibernateException`

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-2012 Red Hat, Inc. All Rights Reserved.