com.h3c.util.persistence

## Interface WriteQuery<T,C>

- Type Parameters:
    `T` - Type of the TransportObject object
    `C` - Type of the context of the query. This varies with the implementation of the application and the database used.
  All Known Implementing Classes:
    AddQuery, DeleteQuery, DeleteQueryWithFilter, TransWriteQueryDecorator, TransWriteWithSelStarDecorator, UpdateQuery, WriteQueryDecorator, WriteQueryLoggingDecorator

      public interface WriteQuery<T,C>

  `WriteQuery` provides ability for the business logic to perform Write operations on the persistence layer. The applications use DAO to perform all database operations and the WriteQuery interface provides methods that DAO can use to infer the type of query, the filter conditions, the sort specifications and take the user query to the lower tiers.

  `execute(C)` is a single call that the application/business logic makes to perform a write operation. The implemented execute method takes the Context as parameter. The Context varies with implementation and DAO uses this context to pass data down to the entity manager.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `execute(C context)` This is the single execute method provided by the WriteQuery interface.

- - ### Method Detail

    - #### execute

          T execute(C context)
                    throws Exception

      This is the single execute method provided by the WriteQuery interface. The application/business logic prepares a write query and as the last step, calls this method to transmit data to the underlying tiers. This data is persisted using DAO and Entity Manager.
      Parameters:
        `context` - - The DataStore context. Provides the context to the query.
      Returns:
        Transport object that has been persisted/deleted.
      Throws:
        `Exception`

Copyright © 2014. All Rights Reserved.