Package org.bonitasoft.engine.bdm
Class BusinessObjectDAOFactory
java.lang.Object
org.bonitasoft.engine.bdm.BusinessObjectDAOFactory
A factory to create Data Access Objects (DAO). These DAOs interact with
BusinessObjects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO>
TCreates the implementation of the DAO for the given session.protected <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO>
Class<T>Loads the class of theBusinessObjectDAOaccording to its class name.
-
Constructor Details
-
BusinessObjectDAOFactory
public BusinessObjectDAOFactory()
-
-
Method Details
-
createDAO
public <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO> T createDAO(org.bonitasoft.engine.session.APISession session, Class<T> daoInterface) throws BusinessObjectDaoCreationException Creates the implementation of the DAO for the given session.- Parameters:
session- the current opened sessiondaoInterface- the interface of the DAO- Returns:
- the implementation of the DAO
- Throws:
BusinessObjectDaoCreationException- if the factory is not able to instantiate the DAO
-
loadClass
protected <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO> Class<T> loadClass(String daoClassName) throws ClassNotFoundException Loads the class of theBusinessObjectDAOaccording to its class name.The loading is done in the current Thread.
- Parameters:
daoClassName- the name of the class of the DAO- Returns:
- the class of the BusinessObjectDAO
- Throws:
ClassNotFoundException- if the daoClassName is unknown by the current Thread
-