Interface TopiaDaoSupplier

All Known Subinterfaces:
TopiaPersistenceContext
All Known Implementing Classes:
AbstractTopiaPersistenceContext

public interface TopiaDaoSupplier
Contract that provides any Dao instance from a given entity class.
Since:
3.0
Author:
bleny
  • Method Details

    • getDao

      <E extends TopiaEntity> TopiaDao<E> getDao(Class<E> entityClass)
      Get Dao for specified class. If the specialized Dao exists then it is returned otherwise a TopiaException will be thrown.
      Type Parameters:
      E - type of entity
      Parameters:
      entityClass - type of entity
      Returns:
      the expected dao
    • getDao

      <E extends TopiaEntity, D extends TopiaDao<E>> D getDao(Class<E> entityClass, Class<D> daoClass)
      Get Dao for specified class. If the specialized Dao exists then it is returned otherwise a TopiaException will be thrown.
      Type Parameters:
      E - type of entity
      D - type of dao
      Parameters:
      entityClass - type of entity
      daoClass - the concrete dao class to use
      Returns:
      the expected dao