slib.utils.impl
Interface QueryIterator

All Known Implementing Classes:
QueryFileIterator

public interface QueryIterator

Interface defining the generic behavior a Query iterator must follows. The Query iterator thus enables to iterate through the full set of queries contained in a particular repository (in file, in memory collection).

Author:
Sebastien Harispe

Method Summary
 void close()
          Close the opened repository
 long getNumberQueries()
           
 boolean hasNext()
           
 QueryEntry next()
           
 List<QueryEntry> nextValids(int nbValues)
          Return a List containing the next valid queries.
 

Method Detail

next

QueryEntry next()
Returns:
the next available QueryEntry. Also return null if the row repository do not correspond to a well formed entry.

nextValids

List<QueryEntry> nextValids(int nbValues)
                            throws Exception
Return a List containing the next valid queries. If the number of the next queries is lower than the requested. number of queries only the available number of queries is returned.

Parameters:
nbValues - the number of values the query list must contains.
Returns:
a List of QueryEntry
Throws:
Exception - if query access can throw an exception.

hasNext

boolean hasNext()
Returns:
boolean return true if a query is available else either

getNumberQueries

long getNumberQueries()
                      throws Exception
Returns:
a long corresponding to the number of query available in the number of queries available in the repository
Throws:
Exception

close

void close()
           throws Exception
Close the opened repository

Throws:
Exception


Copyright © 2013. All Rights Reserved.