ch.elca.el4j.services.persistence.generic.dao
Interface DaoRegistry

All Known Implementing Classes:
DefaultDaoRegistry, FallbackDaoRegistry

public interface DaoRegistry

A registry for DAOs.

Author:
Adrian Moos (AMS), Alex Mathey (AMA), Jonas Hauenstein (JHN)
File-location:
DaoRegistry
Last check-in date:
2010-01-06 10:07:00 +0100 (Mi, 06. Jan 2010) by jonasha for revision 4071

Method Summary
<T> T
getDao(Class<T> doaType)
          Returns the DAO of a given type.
 Map<Class<?>,? extends GenericDao<?>> getDaos()
           
<T> GenericDao<T>
getFor(Class<T> entityType)
          Returns the generic DAO for entities of type entityType.
 

Method Detail

getFor

<T> GenericDao<T> getFor(Class<T> entityType)
Returns the generic DAO for entities of type entityType.

Type Parameters:
T - The domain class type.
Parameters:
entityType - The domain class for which a generic DAO should be returned. The class does some basic handling to tolerate (i.e. unwrap) Spring proxies.
Returns:
A fully generic or partially specific DAO for the given type, or null if none was found.

getDao

<T> T getDao(Class<T> doaType)
Returns the DAO of a given type. If no DAO of the given type is registered, null will be returned.

Type Parameters:
T - The DOA class type.
Parameters:
doaType - The DAO class type for which the DAO should be returned.
Returns:
The DAO for the given type or null.

getDaos

Map<Class<?>,? extends GenericDao<?>> getDaos()
Returns:
Returns the registered DAOs.


Copyright © 2005-2011 ELCA. All Rights Reserved.