DaoViewer (training-module-library 1.0.0-4.12.0-163223 API)
Date: 2018-07-19

org.gcube.portal.trainingmodule.database

## Interface DaoViewer<T>

- Type Parameters:
    `T` - the generic type
  All Known Implementing Classes:
    AbstractPersistence, TrainingProgressUnitPersistence, TrainingProjectPersistence, TrainingUnitPersistence

      public interface DaoViewer<T>

  The Interface DaoViewer.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 10, 2018

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `countItems()` Count items.
    `T` | `getItemByKey(Long id, Class<T> t)` Gets the item by key.
    `List<T>` | `getRows()` Gets the rows.
    `List<T>` | `getRows(int startIndex, int offset)` Gets the rows.
    `List<T>` | `getRowsFiltered(Map<String,String> filterMap)` Gets the rows filtered.
    `List<T>` | `getRowsOrdered(String orderByField, AbstractPersistence.SQL_ORDER order)` Gets the rows ordered.

- - ### Method Detail

    - #### getRows

          List<T> getRows()
                   throws DatabaseServiceException

      Gets the rows.
      Returns:
        the rows
      Throws:
        `DatabaseServiceException` - the database service exception

    - #### getRows

          List<T> getRows(int startIndex,
                          int offset)
                   throws DatabaseServiceException

      Gets the rows.
      Parameters:
        `startIndex` - the start index
        `offset` - the offset
      Returns:
        the rows
      Throws:
        `DatabaseServiceException` - the database service exception

    - #### countItems

          int countItems()
                  throws DatabaseServiceException

      Count items.
      Returns:
        the int
      Throws:
        `DatabaseServiceException` - the database service exception

    - #### getRowsFiltered

          List<T> getRowsFiltered(Map<String,String> filterMap)
                           throws DatabaseServiceException

      Gets the rows filtered.
      Parameters:
        `filterMap` - the filter map
      Returns:
        the rows filtered
      Throws:
        `DatabaseServiceException` - the database service exception

    - #### getItemByKey

          T getItemByKey(Long id,
                         Class<T> t)
                  throws DatabaseServiceException

      Gets the item by key.
      Parameters:
        `id` - the id
        `t` - the t
      Returns:
        the item by key
      Throws:
        `DatabaseServiceException` - the database service exception

    - #### getRowsOrdered

          List<T> getRowsOrdered(String orderByField,
                                 AbstractPersistence.SQL_ORDER order)
                          throws DatabaseServiceException

      Gets the rows ordered.
      Parameters:
        `orderByField` - the order by field
        `order` - the order
      Returns:
        the rows ordered
      Throws:
        `DatabaseServiceException` - the database service exception

Copyright © 2018. All Rights Reserved.