public interface HGRandomAccessResult<ValueType> extends HGSearchResult<ValueType>
A HGRandomAccessResult
is a search result that is based on some
kind of cursor that allows immediate positioning on some result value, if it
exists. This is particularly useful for index-based search results where the whole
result set is ordered and provides quick lookup to begin with. A query execution
plan may take advantage of this capability.
Modifier and Type | Interface and Description |
---|---|
static class |
HGRandomAccessResult.GotoResult
Enumerates the possible results of a call to the
goTo in a
HGRandomAccessResult . |
EMPTY
Modifier and Type | Method and Description |
---|---|
void |
goAfterLast()
Move the cursor of this result set after the last result.
|
void |
goBeforeFirst()
Move the cursor of this result set before the first result.
|
HGRandomAccessResult.GotoResult |
goTo(ValueType value,
boolean exactMatch)
Position the result set at a particular value if that value
is indeed part of the result set.
|
close, current, isOrdered
hasPrev, prev
HGRandomAccessResult.GotoResult goTo(ValueType value, boolean exactMatch)
Position the result set at a particular value if that value is indeed part of the result set.
value
- The value where this result set should be positioned.exactMatch
- A flag indicating whether the passed in value should
match exactly a value in the result set, or whether the cursor should
be positioned to the closest value. Here "closest" means "smallest
greater than the value
parameter.GotoResult
.void goAfterLast()
Move the cursor of this result set after the last result. When positioned
after the last result, there is no current element, hasNext
will
return false and hasPrev
will return true if there's at least
one element in this result set.
void goBeforeFirst()
Move the cursor of this result set before the first result. This is equivalent
to resetting the cursor to its initial state, right after the result set was
created. When positioned
before the first result, there is no current element, hasPrev
will
return false and hasNext
will return true if there's at least
one element in this result set.
Copyright © 2015. All rights reserved.