|
|||||||||
| Home >> All >> org >> [ hibernate overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.hibernate
Interface ScrollableResults

- public interface ScrollableResults
A result iterator that allows moving around within the results
by arbitrary increments. The Query / ScrollableResults
pattern is very similar to the JDBC PreparedStatement/
ResultSet pattern and the semantics of methods of this interface
are similar to the similarly named methods on ResultSet.
Contrary to JDBC, columns of results are numbered from zero.
| 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) |
void |
close()
Release resources immediately. |
boolean |
first()
Go to the first result |
java.lang.Object[] |
get()
Get the current row of results |
java.lang.Object |
get(int i)
Get the ith object in the current row of results, without initializing any other results in the row. |
java.math.BigDecimal |
getBigDecimal(int col)
Convenience method to read a big_decimal |
java.math.BigInteger |
getBigInteger(int col)
Convenience method to read a big_integer |
byte[] |
getBinary(int col)
Convenience method to read a binary |
java.sql.Blob |
getBlob(int col)
Convenience method to read a blob |
java.lang.Boolean |
getBoolean(int col)
Convenience method to read a boolean |
java.lang.Byte |
getByte(int col)
Convenience method to read a byte |
java.util.Calendar |
getCalendar(int col)
Convenience method to read a calendar or calendar_date |
java.lang.Character |
getCharacter(int col)
Convenience method to read a character |
java.sql.Clob |
getClob(int col)
Convenience method to read a clob |
java.util.Date |
getDate(int col)
Convenience method to read a date, time or timestamp |
java.lang.Double |
getDouble(int col)
Convenience method to read a double |
java.lang.Float |
getFloat(int col)
Convenience method to read a float |
java.lang.Integer |
getInteger(int col)
Convenience method to read an integer |
java.util.Locale |
getLocale(int col)
Convenience method to read a locale |
java.lang.Long |
getLong(int col)
Convenience method to read a long |
int |
getRowNumber()
Get the current location in the result set. |
java.lang.Short |
getShort(int col)
Convenience method to read a short |
java.lang.String |
getString(int col)
Convenience method to read a string |
java.lang.String |
getText(int col)
Convenience method to read text |
java.util.TimeZone |
getTimeZone(int col)
Convenience method to read a timezone |
org.hibernate.type.Type |
getType(int i)
Get the type of the ith column of results |
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). |
| Method Detail |
next
public boolean next()
throws HibernateException
- Advance to the next result
previous
public boolean previous()
throws HibernateException
- Retreat to the previous result
scroll
public boolean scroll(int i)
throws HibernateException
- Scroll an arbitrary number of locations
last
public boolean last()
throws HibernateException
- Go to the last result
first
public boolean first()
throws HibernateException
- Go to the first result
beforeFirst
public void beforeFirst()
throws HibernateException
- Go to a location just before first result (this is the initial location)
afterLast
public void afterLast()
throws HibernateException
- Go to a location just after the last result
isFirst
public boolean isFirst()
throws HibernateException
- Is this the first result?
isLast
public boolean isLast()
throws HibernateException
- Is this the last result?
close
public void close()
throws HibernateException
- Release resources immediately.
get
public java.lang.Object[] get() throws HibernateException
- Get the current row of results
get
public java.lang.Object get(int i) throws HibernateException
- Get the ith 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).
getType
public org.hibernate.type.Type getType(int i)
- Get the type of the ith column of results
getInteger
public java.lang.Integer getInteger(int col) throws HibernateException
- Convenience method to read an integer
getLong
public java.lang.Long getLong(int col) throws HibernateException
- Convenience method to read a long
getFloat
public java.lang.Float getFloat(int col) throws HibernateException
- Convenience method to read a float
getBoolean
public java.lang.Boolean getBoolean(int col) throws HibernateException
- Convenience method to read a boolean
getDouble
public java.lang.Double getDouble(int col) throws HibernateException
- Convenience method to read a double
getShort
public java.lang.Short getShort(int col) throws HibernateException
- Convenience method to read a short
getByte
public java.lang.Byte getByte(int col) throws HibernateException
- Convenience method to read a byte
getCharacter
public java.lang.Character getCharacter(int col) throws HibernateException
- Convenience method to read a character
getBinary
public byte[] getBinary(int col)
throws HibernateException
- Convenience method to read a binary
getText
public java.lang.String getText(int col) throws HibernateException
- Convenience method to read text
getBlob
public java.sql.Blob getBlob(int col) throws HibernateException
- Convenience method to read a blob
getClob
public java.sql.Clob getClob(int col) throws HibernateException
- Convenience method to read a clob
getString
public java.lang.String getString(int col) throws HibernateException
- Convenience method to read a string
getBigDecimal
public java.math.BigDecimal getBigDecimal(int col) throws HibernateException
- Convenience method to read a big_decimal
getBigInteger
public java.math.BigInteger getBigInteger(int col) throws HibernateException
- Convenience method to read a big_integer
getDate
public java.util.Date getDate(int col) throws HibernateException
- Convenience method to read a date, time or timestamp
getLocale
public java.util.Locale getLocale(int col) throws HibernateException
- Convenience method to read a locale
getCalendar
public java.util.Calendar getCalendar(int col) throws HibernateException
- Convenience method to read a calendar or calendar_date
getTimeZone
public java.util.TimeZone getTimeZone(int col) throws HibernateException
- Convenience method to read a timezone
getRowNumber
public int getRowNumber()
throws HibernateException
- Get the current location in the result set. The first
row is number 0, contrary to JDBC.
setRowNumber
public boolean setRowNumber(int rowNumber)
throws HibernateException
- Set the current location in the result set, numbered from either the
first row (row number 0), or the last row (row
number -1).
|
|||||||||
| Home >> All >> org >> [ hibernate overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC