Interface Query<T extends Query<?,​?>,​U>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T asc()
      Order the results ascending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).
      long count()
      Executes the query and returns the number of results
      T desc()
      Order the results descending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).
      java.util.List<U> list()
      Executes the query and get a list of entities as the result.
      java.util.List<U> listPage​(int firstResult, int maxResults)
      Executes the query and get a list of entities as the result.
      U singleResult()
      Executes the query and returns the resulting entity or null if no entity matches the query criteria.
      java.util.List<U> unlimitedList()
      Executes the query.
    • Method Detail

      • asc

        T asc()
        Order the results ascending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).
      • desc

        T desc()
        Order the results descending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).
      • count

        long count()
        Executes the query and returns the number of results
      • singleResult

        U singleResult()
        Executes the query and returns the resulting entity or null if no entity matches the query criteria.
        Throws:
        ProcessEngineException - when the query results in more than one entities.
      • list

        java.util.List<U> list()
        Executes the query and get a list of entities as the result.
        Returns:
        a list of results
        Throws:
        BadUserRequestException - When a maximum results limit is specified. A maximum results limit can be specified with the process engine configuration property queryMaxResultsLimit (default Integer.MAX_VALUE). Please use listPage(int, int) instead.
      • unlimitedList

        java.util.List<U> unlimitedList()
        Executes the query. No limitation checks are performed (e. g. query limit).
        Returns:
        a list of results
      • listPage

        java.util.List<U> listPage​(int firstResult,
                                   int maxResults)
        Executes the query and get a list of entities as the result.
        Parameters:
        firstResult - the index of the first result
        maxResults - the maximum number of results
        Returns:
        a list of results
        Throws:
        BadUserRequestException - When {@param maxResults} exceeds the maximum results limit. A maximum results limit can be specified with the process engine configuration property queryMaxResultsLimit (default Integer.MAX_VALUE).