org.qi4j.api.dataset.iterable
Class IterableQuery<T>

java.lang.Object
  extended by org.qi4j.api.dataset.iterable.IterableQuery<T>
All Implemented Interfaces:
Query<T>

public class IterableQuery<T>
extends java.lang.Object
implements Query<T>

TODO


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.qi4j.api.dataset.Query
Query.Order
 
Constructor Summary
IterableQuery(java.lang.Iterable<T> iterable)
           
 
Method Summary
 long count()
           
<ThrowableType extends java.lang.Throwable>
boolean
execute(Visitor<T,ThrowableType> resultVisitor)
           
 Query filter(Specification<T> filter)
           
 T first()
           
 java.lang.Object getVariable(java.lang.String name)
           
 Query limit(int maxNrOfResults)
           
 Query orderBy(Property<?> property, Query.Order order)
           
 Query<T> setVariable(java.lang.String name, java.lang.Object value)
           
 T single()
           
 Query skip(int skipNrOfResults)
           
 java.lang.Iterable<T> toIterable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableQuery

public IterableQuery(java.lang.Iterable<T> iterable)
Method Detail

filter

public Query filter(Specification<T> filter)
Specified by:
filter in interface Query<T>

orderBy

public Query orderBy(Property<?> property,
                     Query.Order order)
Specified by:
orderBy in interface Query<T>

skip

public Query skip(int skipNrOfResults)
Specified by:
skip in interface Query<T>

limit

public Query limit(int maxNrOfResults)
Specified by:
limit in interface Query<T>

setVariable

public Query<T> setVariable(java.lang.String name,
                            java.lang.Object value)
Specified by:
setVariable in interface Query<T>

getVariable

public java.lang.Object getVariable(java.lang.String name)
Specified by:
getVariable in interface Query<T>

count

public long count()
Specified by:
count in interface Query<T>

first

public T first()
Specified by:
first in interface Query<T>

single

public T single()
         throws QueryException
Specified by:
single in interface Query<T>
Throws:
QueryException

execute

public <ThrowableType extends java.lang.Throwable> boolean execute(Visitor<T,ThrowableType> resultVisitor)
                throws ThrowableType extends java.lang.Throwable
Specified by:
execute in interface Query<T>
Throws:
ThrowableType extends java.lang.Throwable

toIterable

public java.lang.Iterable<T> toIterable()
                                 throws QueryException
Specified by:
toIterable in interface Query<T>
Throws:
QueryException