public class

ScrollableResultsImpl

extends AbstractScrollableResults
implements ScrollableResults
java.lang.Object
   ↳ org.hibernate.impl.AbstractScrollableResults
     ↳ org.hibernate.impl.ScrollableResultsImpl

Class Overview

Implementation of the ScrollableResults interface

Summary

Public Constructors
ScrollableResultsImpl(ResultSet rs, PreparedStatement ps, SessionImplementor sess, Loader loader, QueryParameters queryParameters, Type[] types, HolderInstantiator holderInstantiator)
Public Methods
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
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).
Protected Methods
Object[] getCurrentRow()
[Expand]
Inherited Methods
From class org.hibernate.impl.AbstractScrollableResults
From class java.lang.Object
From interface org.hibernate.ScrollableResults

Public Constructors

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

Public Methods

public void afterLast ()

Go to a location just after the last result

See Also

public void beforeFirst ()

Go to a location just before first result (this is the initial location)

See Also

public boolean first ()

Go to the first result

Returns
  • true if there are any results
See Also

public int getRowNumber ()

Get the current location in the result set. The first row is number 0, contrary to JDBC.

Returns
  • the row number, numbered from 0, or -1 if there is no current row

public boolean isFirst ()

Is this the first result?

Returns
  • true if this is the first row of results
See Also

public boolean isLast ()

Is this the last result?

Returns
  • true if this is the last row of results
See Also

public boolean last ()

Go to the last result

Returns
  • true if there are any results
See Also

public boolean next ()

Advance to the next result

Returns
  • true if there is another result
See Also

public boolean previous ()

Retreat to the previous result

Returns
  • true if there is a previous result
See Also

public boolean scroll (int i)

Scroll an arbitrary number of locations

Parameters
i a positive (forward) or negative (backward) number of rows
Returns
  • true if there is a result at the new location
See Also

public 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).

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

Protected Methods

protected Object[] getCurrentRow ()