Interface PaginatedCriteriaBuilder<T>

    • Method Detail

      • getPageCountQueryString

        String getPageCountQueryString()
        Returns the query string that selects the count of elements.
        Returns:
        The query string
      • getPageIdQueryString

        String getPageIdQueryString()
        Returns the query string that selects the id of the elements.
        Returns:
        The query string
      • withKeysetExtraction

        PaginatedCriteriaBuilder<T> withKeysetExtraction​(boolean keysetExtraction)
        Enable or disables keyset extraction which influences whether PagedList.getKeysetPage() is available.
        Parameters:
        keysetExtraction - true to enable, false to disable keyset extraction
        Returns:
        The query builder for chaining calls
      • isKeysetExtraction

        boolean isKeysetExtraction()
        Returns whether keyset extraction is enabled or not.
        Returns:
        true when enabled, false otherwise
      • withExtractAllKeysets

        PaginatedCriteriaBuilder<T> withExtractAllKeysets​(boolean withExtractAllKeysets)
        Enable or disables keyset extraction for all rows which influences whether PagedList.getKeysetPage() is available.
        Parameters:
        withExtractAllKeysets - true to enable, false to disable keyset extraction for all rows
        Returns:
        The query builder for chaining calls
        Since:
        1.4.0
      • isWithExtractAllKeysets

        boolean isWithExtractAllKeysets()
        Returns whether keyset extraction is enabled or not.
        Returns:
        true when enabled, false otherwise
        Since:
        1.4.0
      • withCountQuery

        PaginatedCriteriaBuilder<T> withCountQuery​(boolean withCountQuery)
        Enables or disables execution of the count query which determines whether PagedList.getTotalSize() is available.
        Parameters:
        withCountQuery - true to enable, false to disable the count query execution
        Returns:
        The query builder for chaining calls
        Since:
        1.2.0
      • isWithCountQuery

        boolean isWithCountQuery()
        Returns whether count query execution is enabled or not.
        Returns:
        true when enabled, false otherwise
        Since:
        1.2.0
      • withBoundedCount

        PaginatedCriteriaBuilder<T> withBoundedCount​(long maximumCount)
        Sets the maximum value up to which a count query should count.
        Parameters:
        maximumCount - the maximum value up to which should be counted
        Returns:
        The query builder for chaining calls
        Since:
        1.5.0
      • getBoundedCount

        long getBoundedCount()
        Returns the maximum value up to which a count query should count.
        Returns:
        the maximum value up to which a count query should count
        Since:
        1.5.0
      • withForceIdQuery

        PaginatedCriteriaBuilder<T> withForceIdQuery​(boolean withForceIdQuery)
        Forces the use of an id query even if the pagination would not need it.
        Parameters:
        withForceIdQuery - true to force id query use, false otherwise
        Returns:
        The query builder for chaining calls
        Since:
        1.3.0
      • isWithForceIdQuery

        boolean isWithForceIdQuery()
        Returns whether id query use is forced.
        Returns:
        true when id query use is forced, false otherwise
        Since:
        1.3.0
      • withHighestKeysetOffset

        PaginatedCriteriaBuilder<T> withHighestKeysetOffset​(int offset)
        Sets the offset for the highest keyset which influences which element of a page is returned by KeysetPage.getHighest(). This is usually used when loading N + 1 rows to know there are further rows but only needing N rows.
        Parameters:
        offset - the offset for the highest keyset relative to the page size
        Returns:
        The query builder for chaining calls
        Since:
        1.2.0
      • getHighestKeysetOffset

        int getHighestKeysetOffset()
        Returns the offset of the highest keyset relative to the page size.
        Returns:
        the offset for the highest keyset relative to the page size
        Since:
        1.2.0
      • withInlineIdQuery

        PaginatedCriteriaBuilder<T> withInlineIdQuery​(boolean withInlineIdQuery)
        Forces the inlining of an id query into the object query.
        Parameters:
        withInlineIdQuery - true to inline the id query, false otherwise
        Returns:
        The query builder for chaining calls
        Since:
        1.4.1
      • isWithInlineIdQuery

        boolean isWithInlineIdQuery()
        Returns whether id query should be inlined.
        Returns:
        true when id query should be inlined, false otherwise
        Since:
        1.4.1
      • withInlineCountQuery

        PaginatedCriteriaBuilder<T> withInlineCountQuery​(boolean withInlineCountQuery)
        Forces the inlining of an count query into the object or id query.
        Parameters:
        withInlineCountQuery - true to inline the count query, false otherwise
        Returns:
        The query builder for chaining calls
        Since:
        1.4.1
      • isWithInlineCountQuery

        boolean isWithInlineCountQuery()
        Returns whether count query should be inlined.
        Returns:
        true when count query should be inlined, false otherwise
        Since:
        1.4.1
      • selectNew

        <Y> PaginatedCriteriaBuilder<Y> selectNew​(ObjectBuilder<Y> builder)
        Description copied from interface: FullQueryBuilder
        Applies the given object builder to this query. The object builder provides the select clauses and is used to transform the result set tuples.
        Specified by:
        selectNew in interface FullQueryBuilder<T,​PaginatedCriteriaBuilder<T>>
        Type Parameters:
        Y - The new query result type specified by the given class
        Parameters:
        builder - The object builder which transforms the result set into objects of type Y
        Returns:
        The query builder for chaining calls