Package com.exedio.cope.misc
Class QueryIterators
java.lang.Object
com.exedio.cope.misc.QueryIterators
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> Iterator<E>
iterateStableQuery
(Query<E> query, int slice) iterateType
(Type<E> type, Condition condition, int slice) iterateTypeTransactionally
(Type<E> type, Condition condition, int slice) Works asiterateType(Type, Condition, int)
but creates its own transaction whenever needed.
-
Method Details
-
iterateType
-
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
- 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.
-