com.h3c.util.persistence.cassandra.query

## Class DeleteQuery<I extends Serializable,T extends TransportObject<? super T,I>,C>

- java.lang.Object
- - com.h3c.util.persistence.cassandra.query.DeleteQuery<I,T,C>

- Type Parameters:
    `I` - Id of the object that needs to be deleted.
    `T` - Type of the TransportObject
    `C` - Type of Context to execute the query.
  All Implemented Interfaces:
    WriteQuery<Boolean,C>

      public class DeleteQuery<I extends Serializable,T extends TransportObject<? super T,I>,C>
      extends Object
      implements WriteQuery<Boolean,C>

  DeleteQuery used to delete an entry from a ColumnFamily/Table in a database.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeleteQuery(Id<T,I> id, Dao<I,T,?,?,?,C> dao)` Query to delete specific entry from a table/ColumnFamily.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Boolean` | `execute(C context)` Execute the delete operation.

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

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

- - ### Constructor Detail

    - #### DeleteQuery

          public DeleteQuery(Id<T,I> id,
                     Dao<I,T,?,?,?,C> dao)

      Query to delete specific entry from a table/ColumnFamily.
      Parameters:
        `id` - Id of the data row to be deleted.
        `dao` - dao to be used for delete operation.

  - ### Method Detail

    - #### execute

          public Boolean execute(C context)
                          throws Exception

      Execute the delete operation.
      Specified by:
        `execute` in interface `WriteQuery<Boolean,C>`
      Parameters:
        `context` - Context to execute the query
      Returns:
        result of Delete operation(TRUE/FALSE).
      Throws:
        `NullPointerException` - In case of context is null.
        `Exception` - Throws Exception in case of any error in query execute.

Copyright © 2014. All Rights Reserved.