| Modifier and Type | Method and Description |
|---|---|
static <T extends DAO> |
getDAO(Class<T> clazz)
Returns DAO implementation by DAO class.
|
static void |
init()
Initializes DAOManager.
|
static void |
registerDAO(Class<? extends DAO> daoClass)
Registers
DAO. |
static void |
shutdown()
Shutdown DAOManager
|
static void |
unregisterDAO(Class<? extends DAO> daoClass)
Unregisters DAO class
|
public static void init()
public static void shutdown()
public static <T extends DAO> T getDAO(Class<T> clazz) throws DAONotFoundException
AccountDAO dao = DAOManager.getDAO(AccountDAO.class);
T - Subclass of DAOclazz - Abstract DAO class implementation of which was registeredDAONotFoundException - if DAO implementation not foundpublic static void registerDAO(Class<? extends DAO> daoClass) throws DAOAlreadyRegisteredException, IllegalAccessException, InstantiationException
DAO.DAO.supports(String, int, int) DAO.getClassName() DAOAlreadyRegisteredException will be throwndaoClass - DAO implementationDAOAlreadyRegisteredException - if DAO is already registeredIllegalAccessException - if something went wrong during instantiation of DAOInstantiationException - if something went wrong during instantiation of DAOCopyright © 2014–2015. All rights reserved.