com.h3c.util.dao.query

## Class DaoCountQuery<F>

- java.lang.Object
- - com.h3c.util.dao.ReadQuery<Long>
  - - com.h3c.util.dao.query.DaoCountQuery<F>

- Type Parameters:
    `F` - type of the filter object

      public class DaoCountQuery<F>
      extends ReadQuery<Long>

  Gets the number of persist objects based on a filter criteria.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DaoCountQuery(F filter, BaseDao<?,?,?,F,?> dao)` Creates a count query.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Long` | `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`

- - ### Constructor Detail

    - #### DaoCountQuery

          public DaoCountQuery(F filter,
                       BaseDao<?,?,?,F,?> dao)

      Creates a count query.
      Parameters:
        `filter` - filter to apply
        `dao` - the DAO to carry out the operation

  - ### Method Detail

    - #### execute

          protected Long execute(DataStoreContext context)

      Description copied from class: `ReadQuery`
      Executes the query.
      Specified by:
        `execute` in class `ReadQuery<Long>`
      Parameters:
        `context` - data store context.
      Returns:
        the result of the query.

Copyright © 2014. All Rights Reserved.