Class QueryIterators

java.lang.Object
com.exedio.cope.misc.QueryIterators

public final class QueryIterators extends Object
  • Method Details

    • 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 as iterateType(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 using iterateType(com.exedio.cope.Type, com.exedio.cope.Condition, int) to deal with unstable queries.