com.h3c.util.dao.query

## Class DaoPagedFindFullDependentQuery<P extends Storable<?> & Dependable<E>,T extends Transportable<? super T,?> & Dependent<R>,F,S,E extends Serializable,W extends Storable<E>,R extends Transportable<? super R,E>>

- java.lang.Object
- - com.h3c.util.dao.ReadQuery<Page<T>>
  - - com.h3c.util.dao.query.DaoPagedFindFullDependentQuery<P,T,F,S,E,W,R>

- Type Parameters:
    `P` - type of the persistent object.
    `T` - type of the transport object with a reference to the owner.
    `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.
    `W` - type of the owner persistent object.
    `R` - type of the owner transport object.

      public class DaoPagedFindFullDependentQuery<P extends Storable<?> & Dependable<E>,T extends Transportable<? super T,?> & Dependent<R>,F,S,E extends Serializable,W extends Storable<E>,R extends Transportable<? super R,E>>
      extends ReadQuery<Page<T>>

  Query to find transport objects on the database. This query assumes the owner is accessed by using a `Dao`.

  Note this query is extremely inefficient because for each dependent found in the database the owner is loaded when the dependent is converted to a transport object.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <P extends Storable<?> & Dependable<E>,T extends Transportable<? super T,?> & Dependent<R>,F,S,E extends Serializable,W extends Storable<E>,R extends Transportable<? super R,E>> ReadQuery<Page<T>>` | `createQuery(F filter, SortSpecification<S> sortSpecification, PageRequest pageRequest, BidirectionalDependentDao<?,P,T,?,F,S,E,W,R> dao, Dao<E,W,R,?,?> ownerDao)` Creates a query.
    `protected Page<T>` | `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>,T extends Transportable<? super T,?> & Dependent<R>,F,S,E extends Serializable,W extends Storable<E>,R extends Transportable<? super R,E>> ReadQuery<Page<T>> createQuery(F filter,
                                                                                                                                                                                                                       SortSpecification<S> sortSpecification,
                                                                                                                                                                                                                       PageRequest pageRequest,
                                                                                                                                                                                                                       BidirectionalDependentDao<?,P,T,?,F,S,E,W,R> dao,
                                                                                                                                                                                                                       Dao<E,W,R,?,?> ownerDao)

      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.
        `ownerDao` - owner DAO.
      Returns:
        a query to add a transport object.

    - #### execute

          protected Page<T> execute(DataStoreContext context)

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

Copyright © 2014. All Rights Reserved.