org.hibernate.search.query.hibernate.impl

## Class ScrollableResultsImpl

- java.lang.Object
- - org.hibernate.search.query.hibernate.impl.ScrollableResultsImpl

- All Implemented Interfaces:
    AutoCloseable, ScrollableResultsImplementor, ScrollableResults

      public class ScrollableResultsImpl
      extends Object
      implements ScrollableResults, ScrollableResultsImplementor

  Implements scrollable and paginated resultsets. Contrary to Query#iterate() or Query#list(), this implementation is exposed to returned null objects (if the index is out of date).

  The following methods that change the value of 'current' will check and set its value to either 'afterLast' or 'beforeFirst' depending on direction. This is to prevent rogue values from setting it outside the boundaries of the results.

  - next()
  - previous()
  - scroll(i)
  - last()
  - first()
  Author:
    Emmanuel Bernard, John Griffin, Sanne Grinovero
  See Also:
    `Query.scroll()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScrollableResultsImpl(int fetchSize, DocumentExtractor extractor, Loader loader, SessionImplementor sessionImplementor, boolean hasThisProjection)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterLast()`
    `void` | `beforeFirst()`
    `void` | `close()`
    `boolean` | `first()`
    `Object[]` | `get()`
    `Object` | `get(int i)` This method is not supported on Lucene based queries
    `BigDecimal` | `getBigDecimal(int col)` This method is not supported on Lucene based queries
    `BigInteger` | `getBigInteger(int col)` This method is not supported on Lucene based queries
    `byte[]` | `getBinary(int col)` This method is not supported on Lucene based queries
    `Blob` | `getBlob(int col)` This method is not supported on Lucene based queries
    `Boolean` | `getBoolean(int col)` This method is not supported on Lucene based queries
    `Byte` | `getByte(int col)` This method is not supported on Lucene based queries
    `Calendar` | `getCalendar(int col)` This method is not supported on Lucene based queries
    `Character` | `getCharacter(int col)` This method is not supported on Lucene based queries
    `Clob` | `getClob(int col)` This method is not supported on Lucene based queries
    `Date` | `getDate(int col)` This method is not supported on Lucene based queries
    `Double` | `getDouble(int col)` This method is not supported on Lucene based queries
    `Float` | `getFloat(int col)` This method is not supported on Lucene based queries
    `Integer` | `getInteger(int col)` This method is not supported on Lucene based queries
    `Locale` | `getLocale(int col)` This method is not supported on Lucene based queries
    `Long` | `getLong(int col)` This method is not supported on Lucene based queries
    `int` | `getNumberOfTypes()` This method is not supported on Lucene based queries
    `int` | `getRowNumber()`
    `Short` | `getShort(int col)` This method is not supported on Lucene based queries
    `String` | `getString(int col)` This method is not supported on Lucene based queries
    `String` | `getText(int col)` This method is not supported on Lucene based queries
    `TimeZone` | `getTimeZone(int col)` This method is not supported on Lucene based queries
    `Type` | `getType(int i)` This method is not supported on Lucene based queries
    `boolean` | `isClosed()`
    `boolean` | `isFirst()`
    `boolean` | `isLast()`
    `boolean` | `last()`
    `boolean` | `next()`
    `boolean` | `previous()`
    `boolean` | `scroll(int i)`
    `boolean` | `setRowNumber(int rowNumber)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScrollableResultsImpl

          public ScrollableResultsImpl(int fetchSize,
                                       DocumentExtractor extractor,
                                       Loader loader,
                                       SessionImplementor sessionImplementor,
                                       boolean hasThisProjection)

  - ### Method Detail

    - #### next

          public boolean next()

      Specified by:
        `next` in interface `ScrollableResults`

    - #### previous

          public boolean previous()

      Specified by:
        `previous` in interface `ScrollableResults`

    - #### scroll

          public boolean scroll(int i)

      Specified by:
        `scroll` in interface `ScrollableResults`

    - #### last

          public boolean last()

      Specified by:
        `last` in interface `ScrollableResults`

    - #### first

          public boolean first()

      Specified by:
        `first` in interface `ScrollableResults`

    - #### beforeFirst

          public void beforeFirst()

      Specified by:
        `beforeFirst` in interface `ScrollableResults`

    - #### afterLast

          public void afterLast()

      Specified by:
        `afterLast` in interface `ScrollableResults`

    - #### isFirst

          public boolean isFirst()

      Specified by:
        `isFirst` in interface `ScrollableResults`

    - #### isLast

          public boolean isLast()

      Specified by:
        `isLast` in interface `ScrollableResults`

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `ScrollableResults`

    - #### get

          public Object[] get()

      Specified by:
        `get` in interface `ScrollableResults`

    - #### get

          public Object get(int i)

      This method is not supported on Lucene based queries
      Specified by:
        `get` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getType

          public Type getType(int i)

      This method is not supported on Lucene based queries
      Specified by:
        `getType` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getInteger

          public Integer getInteger(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getInteger` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getLong

          public Long getLong(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getLong` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getFloat

          public Float getFloat(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getFloat` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getBoolean

          public Boolean getBoolean(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getBoolean` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getDouble

          public Double getDouble(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getDouble` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getShort

          public Short getShort(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getShort` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getByte

          public Byte getByte(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getByte` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getCharacter

          public Character getCharacter(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getCharacter` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getBinary

          public byte[] getBinary(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getBinary` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getText

          public String getText(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getText` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getBlob

          public Blob getBlob(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getBlob` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getClob

          public Clob getClob(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getClob` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getString

          public String getString(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getString` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getBigDecimal

          public BigDecimal getBigDecimal(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getBigDecimal` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getBigInteger

          public BigInteger getBigInteger(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getBigInteger` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getDate

          public Date getDate(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getDate` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getLocale

          public Locale getLocale(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getLocale` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getCalendar

          public Calendar getCalendar(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getCalendar` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getTimeZone

          public TimeZone getTimeZone(int col)

      This method is not supported on Lucene based queries
      Specified by:
        `getTimeZone` in interface `ScrollableResults`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getNumberOfTypes

          public int getNumberOfTypes()

      This method is not supported on Lucene based queries
      Specified by:
        `getNumberOfTypes` in interface `ScrollableResultsImplementor`
      Throws:
        `UnsupportedOperationException` - always thrown

    - #### getRowNumber

          public int getRowNumber()

      Specified by:
        `getRowNumber` in interface `ScrollableResults`

    - #### setRowNumber

          public boolean setRowNumber(int rowNumber)

      Specified by:
        `setRowNumber` in interface `ScrollableResults`

    - #### isClosed

          public boolean isClosed()

      Specified by:
        `isClosed` in interface `ScrollableResultsImplementor`

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved