Package com.exedio.cope.misc
Class QueryIterators
- java.lang.Object
-
- com.exedio.cope.misc.QueryIterators
-
public final class QueryIterators extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> Iterator<E>
iterateStableQuery(Query<E> query, int slice)
static <E extends Item>
Iterator<E>iterateType(Type<E> type, Condition condition, int slice)
static <E extends Item>
Iterator<E>iterateTypeTransactionally(Type<E> type, Condition condition, int slice)
Works asiterateType(Type, Condition, int)
but creates its own transaction whenever needed.
-
-
-
Method Detail
-
iterateType
public static <E extends Item> Iterator<E> iterateType(Type<E> type, Condition condition, int slice)
-
iterateTypeTransactionally
public static <E extends Item> Iterator<E> iterateTypeTransactionally(Type<E> type, Condition condition, int slice)
Works asiterateType(Type, Condition, int)
but creates its own transaction whenever needed.
-
iterateStableQuery
public static <E> Iterator<E> iterateStableQuery(Query<E> query, int slice)
- Parameters:
query
- BEWARE: The mechanism of this iterator works only, if the query result is stable. This means, the result of the query does not change while iterating. Otherwise, the iterator may miss some results, or return duplicates. Consider usingiterateType(com.exedio.cope.Type, com.exedio.cope.Condition, int)
to deal with unstable queries.
-
-