|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public boolean next() throws HibernateException
HibernateException
public boolean previous() throws HibernateException
HibernateException
public boolean scroll(int i) throws HibernateException
i
- a positive (forward) or negative (backward) number of rows
HibernateException
public boolean last() throws HibernateException
HibernateException
public boolean first() throws HibernateException
HibernateException
public void beforeFirst() throws HibernateException
HibernateException
public void afterLast() throws HibernateException
HibernateException
public boolean isFirst() throws HibernateException
HibernateException
public boolean isLast() throws HibernateException
HibernateException
public void close() throws HibernateException
HibernateException
public Object[] get() throws HibernateException
HibernateException
public Object get(int i) throws HibernateException
i
- the column, numbered from zero
HibernateException
public Type getType(int i)
i
- the column, numbered from zero
public Integer getInteger(int col) throws HibernateException
HibernateException
public Long getLong(int col) throws HibernateException
HibernateException
public Float getFloat(int col) throws HibernateException
HibernateException
public Boolean getBoolean(int col) throws HibernateException
HibernateException
public Double getDouble(int col) throws HibernateException
HibernateException
public Short getShort(int col) throws HibernateException
HibernateException
public Byte getByte(int col) throws HibernateException
HibernateException
public Character getCharacter(int col) throws HibernateException
HibernateException
public byte[] getBinary(int col) throws HibernateException
HibernateException
public String getText(int col) throws HibernateException
HibernateException
public Blob getBlob(int col) throws HibernateException
HibernateException
public Clob getClob(int col) throws HibernateException
HibernateException
public String getString(int col) throws HibernateException
HibernateException
public BigDecimal getBigDecimal(int col) throws HibernateException
HibernateException
public BigInteger getBigInteger(int col) throws HibernateException
HibernateException
public Date getDate(int col) throws HibernateException
HibernateException
public Locale getLocale(int col) throws HibernateException
HibernateException
public Calendar getCalendar(int col) throws HibernateException
HibernateException
public TimeZone getTimeZone(int col) throws HibernateException
HibernateException
public int getRowNumber() throws HibernateException
HibernateException
public 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 |