com.h3c.util.dao.query

## Class DaoPagedFindDependentQuery<P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>,F,S,E extends Serializable>

- java.lang.Object
- - com.h3c.util.dao.ReadQuery<Page<Q>>
  - - com.h3c.util.dao.query.DaoPagedFindDependentQuery<P,Q,F,S,E>

- Type Parameters:
    `P` - type of the persistent object.
    `Q` - type of the transport object with a reference to the owner's id.
    `F` - type of the associated filter.
    `S` - type of the associated sort specification type.
    `E` - type of the owner persistent object and owner transport object id. This type should be immutable. It is critical this type implements equals() and hashCode() correctly.

      public class DaoPagedFindDependentQuery<P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>,F,S,E extends Serializable>
      extends ReadQuery<Page<Q>>

  Query to find transport objects on the database

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>,F,S,E extends Serializable> ReadQuery<Page<Q>>` | `createQuery(F filter, SortSpecification<S> sortSpecification, PageRequest pageRequest, BidirectionalDependentDao<?,P,?,Q,F,S,E,?,?> dao)` Creates a query.
    `protected Page<Q>` | `execute(DataStoreContext context)` Executes the query.

    - ### Methods inherited from class com.h3c.util.dao.ReadQuery

      `execute`

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

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

- - ### Method Detail

    - #### createQuery

          public static <P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>,F,S,E extends Serializable> ReadQuery<Page<Q>> createQuery(F filter,
                                                                                                                                                            SortSpecification<S> sortSpecification,
                                                                                                                                                            PageRequest pageRequest,
                                                                                                                                                            BidirectionalDependentDao<?,P,?,Q,F,S,E,?,?> dao)

      Creates a query.

      This method is a convenience to infer the generic types.

      Parameters:
        `filter` - filter used to select the transport objects.
        `sortSpecification` - sort specification.
        `pageRequest` - page request.
        `dao` - DAO used to perform the database operations for the query.
      Returns:
        a query to add a transport object.

    - #### execute

          protected Page<Q> execute(DataStoreContext context)

      Description copied from class: `ReadQuery`
      Executes the query.
      Specified by:
        `execute` in class `ReadQuery<Page<Q extends Transportable<? super Q,?> & Dependent<E>>>`
      Parameters:
        `context` - data store context.
      Returns:
        the result of the query.

Copyright © 2014. All Rights Reserved.