|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Query.scroll()
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 |
Object[] |
get()
Get the current row of results |
Object |
get(int i)
Get the ith object in the current row of results, without initializing any other results in the row. |
BigDecimal |
getBigDecimal(int col)
Convenience method to read a big_decimal |
BigInteger |
getBigInteger(int col)
Convenience method to read a big_integer |
byte[] |
getBinary(int col)
Convenience method to read a binary |
Blob |
getBlob(int col)
Convenience method to read a blob |
Boolean |
getBoolean(int col)
Convenience method to read a boolean |
Byte |
getByte(int col)
Convenience method to read a byte |
Calendar |
getCalendar(int col)
Convenience method to read a calendar or calendar_date |
Character |
getCharacter(int col)
Convenience method to read a character |
Clob |
getClob(int col)
Convenience method to read a clob |
Date |
getDate(int col)
Convenience method to read a date, time or timestamp |
Double |
getDouble(int col)
Convenience method to read a double |
Float |
getFloat(int col)
Convenience method to read a float |
Integer |
getInteger(int col)
Convenience method to read an integer |
Locale |
getLocale(int col)
Convenience method to read a locale |
Long |
getLong(int col)
Convenience method to read a long |
int |
getRowNumber()
Get the current location in the result set. |
Short |
getShort(int col)
Convenience method to read a short |
String |
getString(int col)
Convenience method to read a string |
String |
getText(int col)
Convenience method to read text |
TimeZone |
getTimeZone(int col)
Convenience method to read a timezone |
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 |
---|
boolean next() throws HibernateException
HibernateException
boolean previous() throws HibernateException
HibernateException
boolean scroll(int i) throws HibernateException
i
- a positive (forward) or negative (backward) number of rows
HibernateException
boolean last() throws HibernateException
HibernateException
boolean first() throws HibernateException
HibernateException
void beforeFirst() throws HibernateException
HibernateException
void afterLast() throws HibernateException
HibernateException
boolean isFirst() throws HibernateException
HibernateException
boolean isLast() throws HibernateException
HibernateException
void close() throws HibernateException
HibernateException
Object[] get() throws HibernateException
HibernateException
Object get(int i) throws HibernateException
i
- the column, numbered from zero
HibernateException
Type getType(int i)
i
- the column, numbered from zero
Integer getInteger(int col) throws HibernateException
HibernateException
Long getLong(int col) throws HibernateException
HibernateException
Float getFloat(int col) throws HibernateException
HibernateException
Boolean getBoolean(int col) throws HibernateException
HibernateException
Double getDouble(int col) throws HibernateException
HibernateException
Short getShort(int col) throws HibernateException
HibernateException
Byte getByte(int col) throws HibernateException
HibernateException
Character getCharacter(int col) throws HibernateException
HibernateException
byte[] getBinary(int col) throws HibernateException
HibernateException
String getText(int col) throws HibernateException
HibernateException
Blob getBlob(int col) throws HibernateException
HibernateException
Clob getClob(int col) throws HibernateException
HibernateException
String getString(int col) throws HibernateException
HibernateException
BigDecimal getBigDecimal(int col) throws HibernateException
HibernateException
BigInteger getBigInteger(int col) throws HibernateException
HibernateException
Date getDate(int col) throws HibernateException
HibernateException
Locale getLocale(int col) throws HibernateException
HibernateException
Calendar getCalendar(int col) throws HibernateException
HibernateException
TimeZone getTimeZone(int col) throws HibernateException
HibernateException
int getRowNumber() throws HibernateException
HibernateException
boolean setRowNumber(int rowNumber) throws HibernateException
rowNumber
- the row number, numbered from the last row, in the
case of a negative row number
HibernateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |