com.agimatec.sql.query
Class QueryResult<E>

java.lang.Object
  extended by com.agimatec.sql.query.QueryResult<E>
All Implemented Interfaces:
Serializable, Iterable<E>

public class QueryResult<E>
extends Object
implements Serializable, Iterable<E>

A LookupResult is the result of executing a query. It holds a list of result instances and the information if there are more results on the server that are not included (because the client did not want more results than requested.)

See Also:
Serialized Form

Constructor Summary
QueryResult(List<E> list)
           
QueryResult(List<E> list, boolean aIsComplete)
           
 
Method Summary
 E getFirst()
          convenience -
 E getLast()
          convenience -
 List<E> getList()
           
 boolean isComplete()
           
 boolean isEmpty()
          convenience - return whether the list is empty.
 Iterator<E> iterator()
           
 int size()
          convenience - the number of objects in the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResult

public QueryResult(List<E> list)
Parameters:
list - - a serializable list

QueryResult

public QueryResult(List<E> list,
                   boolean aIsComplete)
Parameters:
list - - a list (should be serializable!)
aIsComplete -
Method Detail

getList

public List<E> getList()
Returns:
a list of objects = the results of the query

iterator

public Iterator<E> iterator()
Specified by:
iterator in interface Iterable<E>

isComplete

public boolean isComplete()
Returns:
true when there are more results on the server that are not included in the list

size

public int size()
convenience - the number of objects in the list


isEmpty

public boolean isEmpty()
convenience - return whether the list is empty.

Returns:
true when the list is empty

getFirst

public E getFirst()
convenience -

Returns:
the first object in the list or null when the list is empty

getLast

public E getLast()
convenience -

Returns:
the last object in the list or null when the list is empty


Copyright © 2008-2012. All Rights Reserved.