public class ScrollableResultsImpl extends Object implements ScrollableResults, ScrollableResultsImplementor
The following methods that change the value of 'current' will check and set its value to either 'afterLast' or 'beforeFirst' depending on direction. This is to prevent rogue values from setting it outside the boundaries of the results.
Query.scroll()
Constructor and Description |
---|
ScrollableResultsImpl(int fetchSize,
org.hibernate.search.query.engine.spi.DocumentExtractor extractor,
Loader loader,
SessionImplementor sessionImplementor,
boolean hasThisProjection) |
Modifier and Type | Method and Description |
---|---|
void |
afterLast()
Go to a location just after the last result.
|
void |
beforeFirst()
Go to a location just before first result, This is the location of the cursor on a newly returned
scrollable result.
|
void |
close()
Release resources immediately.
|
boolean |
first()
Go to the first result.
|
Object[] |
get()
Get the current row of results.
|
Object |
get(int i)
This method is not supported on Lucene based queries
|
BigDecimal |
getBigDecimal(int col)
This method is not supported on Lucene based queries
|
BigInteger |
getBigInteger(int col)
This method is not supported on Lucene based queries
|
byte[] |
getBinary(int col)
This method is not supported on Lucene based queries
|
Blob |
getBlob(int col)
This method is not supported on Lucene based queries
|
Boolean |
getBoolean(int col)
This method is not supported on Lucene based queries
|
Byte |
getByte(int col)
This method is not supported on Lucene based queries
|
Calendar |
getCalendar(int col)
This method is not supported on Lucene based queries
|
Character |
getCharacter(int col)
This method is not supported on Lucene based queries
|
Clob |
getClob(int col)
This method is not supported on Lucene based queries
|
Date |
getDate(int col)
This method is not supported on Lucene based queries
|
Double |
getDouble(int col)
This method is not supported on Lucene based queries
|
Float |
getFloat(int col)
This method is not supported on Lucene based queries
|
Integer |
getInteger(int col)
This method is not supported on Lucene based queries
|
Locale |
getLocale(int col)
This method is not supported on Lucene based queries
|
Long |
getLong(int col)
This method is not supported on Lucene based queries
|
int |
getNumberOfTypes()
This method is not supported on Lucene based queries
|
int |
getRowNumber()
Get the current position in the results.
|
Short |
getShort(int col)
This method is not supported on Lucene based queries
|
String |
getString(int col)
This method is not supported on Lucene based queries
|
String |
getText(int col)
This method is not supported on Lucene based queries
|
TimeZone |
getTimeZone(int col)
This method is not supported on Lucene based queries
|
Type |
getType(int i)
This method is not supported on Lucene based queries
|
boolean |
isClosed() |
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 the specified number of positions from the current position.
|
boolean |
setRowNumber(int rowNumber)
Set the current position in the result set.
|
public ScrollableResultsImpl(int fetchSize, org.hibernate.search.query.engine.spi.DocumentExtractor extractor, Loader loader, SessionImplementor sessionImplementor, boolean hasThisProjection)
public boolean next()
next
in interface ScrollableResults
true
if there is another resultpublic boolean previous()
ScrollableResults
previous
in interface ScrollableResults
true
if there is a previous resultpublic boolean scroll(int i)
ScrollableResults
scroll
in interface ScrollableResults
i
- a positive (forward) or negative (backward) number of rowstrue
if there is a result at the new locationpublic boolean last()
ScrollableResults
last
in interface ScrollableResults
true
if there are any resultspublic boolean first()
ScrollableResults
first
in interface ScrollableResults
true
if there are any resultspublic void beforeFirst()
ScrollableResults
beforeFirst
in interface ScrollableResults
public void afterLast()
ScrollableResults
afterLast
in interface ScrollableResults
public boolean isFirst()
ScrollableResults
isFirst
in interface ScrollableResults
true
if this is the first row of results, otherwise false
public boolean isLast()
ScrollableResults
isLast
in interface ScrollableResults
true
if this is the last row of results.public void close()
ScrollableResults
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ScrollableResults
public Object[] get()
ScrollableResults
get
in interface ScrollableResults
public Object get(int i)
get
in interface ScrollableResults
i
- the column, numbered from zeronull
UnsupportedOperationException
- always thrownpublic Type getType(int i)
getType
in interface ScrollableResults
i
- the column, numbered from zeroUnsupportedOperationException
- always thrownpublic Integer getInteger(int col)
getInteger
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Long getLong(int col)
getLong
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Float getFloat(int col)
getFloat
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Boolean getBoolean(int col)
getBoolean
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Double getDouble(int col)
getDouble
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Short getShort(int col)
getShort
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Byte getByte(int col)
getByte
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Character getCharacter(int col)
getCharacter
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic byte[] getBinary(int col)
getBinary
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic String getText(int col)
getText
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Blob getBlob(int col)
getBlob
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Clob getClob(int col)
getClob
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic String getString(int col)
getString
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic BigDecimal getBigDecimal(int col)
getBigDecimal
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic BigInteger getBigInteger(int col)
getBigInteger
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Date getDate(int col)
getDate
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Locale getLocale(int col)
getLocale
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic Calendar getCalendar(int col)
getCalendar
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic TimeZone getTimeZone(int col)
getTimeZone
in interface ScrollableResults
col
- The column, numbered from zeroUnsupportedOperationException
- always thrownpublic int getNumberOfTypes()
getNumberOfTypes
in interface ScrollableResultsImplementor
UnsupportedOperationException
- always thrownpublic int getRowNumber()
ScrollableResults
getRowNumber
in interface ScrollableResults
public boolean setRowNumber(int rowNumber)
ScrollableResults
setRowNumber
in interface ScrollableResults
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.public boolean isClosed()
isClosed
in interface ScrollableResultsImplementor
Copyright © 2019 JBoss by Red Hat. All rights reserved.