com.h3c.util.persistence.cassandra.query

## Class PagedFindQuery<T extends TransportObject<? super T,?>,P extends Storable<?>,F,S,C>

- java.lang.Object
- - com.h3c.util.persistence.cassandra.query.PagedFindQuery<T,P,F,S,C>

- Type Parameters:
    `T` - Type of the Query result passed to business logic
    `P` - Type of query result which incurred while dao executes the query.
    `F` - Filter to find
    `S` - Sort specification for sort the result
    `C` - Type of Context to execute the query.
  All Implemented Interfaces:
    ReadQuery<MarkPage<T>,C>

      public class PagedFindQuery<T extends TransportObject<? super T,?>,P extends Storable<?>,F,S,C>
      extends Object
      implements ReadQuery<MarkPage<T>,C>

  Find Query with pagination support. The result of find query operation returns to the business logic in paginated fashion.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PagedFindQuery(F filter, SortSpecification<S> sortSpec, MarkPageRequest<T> request, Dao<?,T,P,F,S,C> dao)` Find query with pagination Support.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MarkPage<T>` | `execute(C context)` Execute the Paged find operation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PagedFindQuery

          public PagedFindQuery(F filter,
                        SortSpecification<S> sortSpec,
                        MarkPageRequest<T> request,
                        Dao<?,T,P,F,S,C> dao)

      Find query with pagination Support. Find the list of entries matches the filter criteria. Return the result to the business logic in the user specified paged and sorting order.
      Parameters:
        `filter` - Filter for the Query
        `sortSpec` - The sorting Order for the result(Ascending/Descending)
        `request` - Page specification.
        `dao` - Dao to execute the query

  - ### Method Detail

    - #### execute

          public MarkPage<T> execute(C context)
                                                                   throws Exception

      Execute the Paged find operation.
      Specified by:
        `execute` in interface `ReadQuery<MarkPage<T extends TransportObject<? super T,?>>,C>`
      Parameters:
        `context` - Context to execute the query
      Returns:
        result of PagedFind Query.
      Throws:
        `NullPointerException` - In case of context is null.
        `Exception` - Throws Exception in case of any error in query execute.

Copyright © 2014. All Rights Reserved.