com.tibbo.aggregate.common.dao

## Interface DataDao

- All Superinterfaces:
    Dao

      public interface DataDao
      extends Dao

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deleteData(Data data)` Delete a persistent data block.
    `void` | `deleteData(long dataId)` Delete a persistent data block.
    `Data` | `getData(long id)` Load a persistently stored data block.
    `DataTable` | `getStatistics()` Returns usage statistics table.
    `void` | `saveOrUpdateData(Data data)` Persistently save a data block.

    - ### Methods inherited from interface com.tibbo.aggregate.common.dao.Dao

      `isManaged, shutdown`

- - ### Method Detail

    - #### getData

          Data getData(long id)
                throws DaoException

      Load a persistently stored data block.
      Parameters:
        `id` - A unique identified of a previously stored data block.
      Returns:
        A loaded data block
      Throws:
        `DaoException` - If loading has failed

    - #### saveOrUpdateData

          void saveOrUpdateData(Data data)
                         throws DaoException

      Persistently save a data block. Block's unique ID is available in the the data block itself. If a block with the same ID already exists, its persistent content should be updated.
      Parameters:
        `data` - A binary block to save or update
      Throws:
        `DaoException` - If save/update operation has failed

    - #### deleteData

          void deleteData(Data data)
                   throws DaoException

      Delete a persistent data block. Normally, block's ID contained in the block itself if required to find and remove it.
      Parameters:
        `data` - A data block to delete, including its unique ID
      Throws:
        `DaoException` - If removal has failed

    - #### deleteData

          void deleteData(long dataId)
                   throws DaoException

      Delete a persistent data block.
      Parameters:
        `dataId` - An ID of data block to delete
      Throws:
        `DaoException` - If removal has failed

    - #### getStatistics

          DataTable getStatistics()

      Returns usage statistics table.