com.h3c.util.dao.query

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

- java.lang.Object
- - com.h3c.util.dao.WriteQuery<Q>
  - - com.h3c.util.dao.query.DaoUpdateDependentQuery<P,Q,E>

- Type Parameters:
    `P` - type of the persistent object.
    `Q` - type of the transport object with a reference to the owner's id.
    `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 DaoUpdateDependentQuery<P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>,E extends Serializable>
      extends WriteQuery<Q>

  Query to update a dependent transport object on the database.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <E extends Serializable,P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>> WriteQuery<Q>` | `createQuery(Q transportable, BidirectionalDependentDao<?,P,?,Q,?,?,E,?,?> dao)` Creates a query.
    `protected Q` | `execute(DataStoreContext context)` Executes the query.

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

      `execute`

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

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

- - ### Method Detail

    - #### createQuery

          public static <E extends Serializable,P extends Storable<?> & Dependable<E>,Q extends Transportable<? super Q,?> & Dependent<E>> WriteQuery<Q> createQuery(Q transportable,
                                                                                                                                                   BidirectionalDependentDao<?,P,?,Q,?,?,E,?,?> dao)

      Creates a query.

      This method is a convenience to infer the generic types.

      Parameters:
        `transportable` - transport object to update.
        `dao` - DAO used to perform the database operations for the query.
      Returns:
        a query to add a transport object.

    - #### execute

          protected Q execute(DataStoreContext context)

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

Copyright © 2014. All Rights Reserved.