Class BusinessObjectDAOFactory

java.lang.Object
org.bonitasoft.engine.bdm.BusinessObjectDAOFactory

public class BusinessObjectDAOFactory extends Object
A factory to create Data Access Objects (DAO). These DAOs interact with BusinessObjects.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO>
    T
    createDAO(org.bonitasoft.engine.session.APISession session, Class<T> daoInterface)
    Creates the implementation of the DAO for the given session.
    protected <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO>
    Class<T>
    loadClass(String daoClassName)
    Loads the class of the BusinessObjectDAO according to its class name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 session
      daoInterface - 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 the BusinessObjectDAO according 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