goodslib
Interface QueryIterator

All Known Implementing Classes:
MapQueryIterator

public interface QueryIterator

Interface of JSQL query iterator


Method Summary
 java.lang.Object getByKey(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.
 

Method Detail

getFirst

public java.lang.Object getFirst()
Get first object.

Returns:
first object or null if there are no object to search.

getNext

public java.lang.Object getNext(java.lang.Object prevObj,
                                int prevIndex)
Get next object.

Parameters:
prevObj - reference returned by previous call of getNext or getFirst
prevIndex - index of previous object (starting from 0 for first object)
Returns:
next object or null if there are no more objects

getByKey

public java.lang.Object getByKey(java.lang.String primaryKey,
                                 java.lang.Object keyValue)
                          throws NoIndexException
Try to use index to locate object by unique primary key.

Parameters:
primaryKey - name of prinmary key field. This files should be unique among all searched object.
keyValue - key value
Returns:
object with specified value of primary key or null if object was not found.
Throws:
NoIndexException - if there is no index for this field