|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for query iterator. Query iterator provides sequential or (and) direct access to the records in the table
Method Summary | |
QueryIterator |
concurrentIterator()
JSQL is able to perform sequential search in parallel. |
boolean |
getByKeyRange(java.lang.String key,
java.lang.Object minValue,
java.lang.Object maxValue,
boolean inclusive,
Query result)
Try to use index to select objects belonginh to the specified range |
java.lang.Object |
getByPrimaryKey(java.lang.String primaryKey,
java.lang.Object keyValue)
Try to use index to locate object by unique primary key. |
java.lang.Object |
getFirst()
Get first object. |
java.lang.Object |
getNext(java.lang.Object prevObj,
int prevIndex)
Get next object. |
boolean |
isThreadSafe()
Check if it is possible to use iterator concurrently. |
boolean |
useNormalizedKeys()
Check if iterator supporting direct access by key stores key values in normalized form (all integer types as Long, all real types as Double, other types as it is). |
Method Detail |
public java.lang.Object getFirst()
null
if there are no object to
search.public java.lang.Object getNext(java.lang.Object prevObj, int prevIndex)
prevObj
- reference returned by previous call of
getNext
or getFirst
prevIndex
- index of previous object (starting from 0 for first
object)
null
if there are no more objectspublic java.lang.Object getByPrimaryKey(java.lang.String primaryKey, java.lang.Object keyValue) throws NoIndexException
primaryKey
- name of primary key field. This files should be
unique among all searched object.keyValue
- key value
null
if object was not found.
NoIndexException
- if there is no index for this fieldpublic boolean getByKeyRange(java.lang.String key, java.lang.Object minValue, java.lang.Object maxValue, boolean inclusive, Query result)
key
- name of key field.minValue
- low bound for key value (if null
, then there
is no low boundmaxValue
- high bound for key value (if null
, then there
is no high boundinclusive
- whether bounds are inclusive or exclusiveresult
- query to which records belongin to the specified range should be added using
add
method
true
if index is applicable, false
otherwisepublic QueryIterator concurrentIterator()
concurrentIterator
should either return this
if iterator is reentrant,
or clone the iterator. This method will be called prior any other access to the iterator by JSQL.
this
if iterator is reentrant or clone of iteratorpublic boolean isThreadSafe()
true
is iterator can be use in parallel search, false
otherwisepublic boolean useNormalizedKeys()
Query.normilizeKeyValue
method.false
then JSQL will try to convert search literals
to the type of the indexed field. But it is possible only if type of the field is known at query
compilation time. Otherwise in case of using dynamic binding such covertsion should be performed
by iterator itself using Query.castLiteral
method.
true
if key values are stored in the index in normalized form
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |