Class EmptyScrollableResults

java.lang.Object
org.hibernate.internal.EmptyScrollableResults
All Implemented Interfaces:
AutoCloseable, ScrollableResultsImplementor, ScrollableResults

public class EmptyScrollableResults extends Object implements ScrollableResultsImplementor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Go to a location just after the last result.
    void
    Go to a location just before first result.
    void
    Release resources immediately.
    boolean
    Go to the first result.
    get()
    Get the current row of results.
    int
    Get the current position in the results.
    boolean
     
    boolean
    Is this the first result?
    boolean
    Is this the last result?
    boolean
    Go to the last result.
    boolean
    Advance to the next result.
    boolean
    position(int position)
    Moves the result cursor to the specified position.
    boolean
    Retreat to the previous result.
    boolean
    scroll(int positions)
    Scroll the specified number of positions from the current position.
    void
    setFetchSize(int fetchSize)
    Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
    boolean
    setRowNumber(int rowNumber)
    Set the current position in the result set.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EmptyScrollableResults

      public EmptyScrollableResults()
  • Method Details

    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface ScrollableResultsImplementor
    • close

      public void close()
      Description copied from interface: ScrollableResults
      Release resources immediately.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ScrollableResults
    • next

      public boolean next()
      Description copied from interface: ScrollableResults
      Advance to the next result.
      Specified by:
      next in interface ScrollableResults
      Returns:
      true if there is another result
    • previous

      public boolean previous()
      Description copied from interface: ScrollableResults
      Retreat to the previous result.
      Specified by:
      previous in interface ScrollableResults
      Returns:
      true if there is a previous result
    • scroll

      public boolean scroll(int positions)
      Description copied from interface: ScrollableResults
      Scroll the specified number of positions from the current position.
      Specified by:
      scroll in interface ScrollableResults
      Parameters:
      positions - a positive (forward) or negative (backward) number of rows
      Returns:
      true if there is a result at the new location
    • position

      public boolean position(int position)
      Description copied from interface: ScrollableResults
      Moves the result cursor to the specified position.
      Specified by:
      position in interface ScrollableResults
      Returns:
      true if there is a result at the new location
    • last

      public boolean last()
      Description copied from interface: ScrollableResults
      Go to the last result.
      Specified by:
      last in interface ScrollableResults
      Returns:
      true if there are any results
    • first

      public boolean first()
      Description copied from interface: ScrollableResults
      Go to the first result.
      Specified by:
      first in interface ScrollableResults
      Returns:
      true if there are any results
    • beforeFirst

      public void beforeFirst()
      Description copied from interface: ScrollableResults
      Go to a location just before first result.

      This is the location of the cursor on a newly returned scrollable result.

      Specified by:
      beforeFirst in interface ScrollableResults
    • afterLast

      public void afterLast()
      Description copied from interface: ScrollableResults
      Go to a location just after the last result.
      Specified by:
      afterLast in interface ScrollableResults
    • isFirst

      public boolean isFirst()
      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, otherwise false
    • isLast

      public boolean isLast()
      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.
    • getRowNumber

      public int getRowNumber()
      Description copied from interface: ScrollableResults
      Get the current position in the results.

      The first position is number 0 (unlike JDBC).

      Specified by:
      getRowNumber in interface ScrollableResults
      Returns:
      The current position number, numbered from 0; -1 indicates that there is no current row
    • setRowNumber

      public boolean setRowNumber(int rowNumber)
      Description copied from interface: ScrollableResults
      Set the current position in the result set.

      Can be numbered from the first result (positive number) or backward from the last result (negative number).

      Specified by:
      setRowNumber in interface ScrollableResults
      Parameters:
      rowNumber - the row number. A positive number indicates a value numbered from the first row; a negative number indicates a value numbered from the last row.
      Returns:
      true if there is a row at that row number
    • setFetchSize

      public void setFetchSize(int fetchSize)
      Description copied from interface: ScrollableResults
      Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. If 0, the JDBC driver's default setting will be used.
      Specified by:
      setFetchSize in interface ScrollableResults
      See Also:
    • get

      public Object[] get()
      Description copied from interface: ScrollableResults
      Get the current row of results.
      Specified by:
      get in interface ScrollableResults
      Returns:
      The array of results