Class BusinessObjectDAOFactory


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO>
      T
      createDAO​(org.bonitasoft.engine.session.APISession session, java.lang.Class<T> daoInterface)
      Creates the implementation of the DAO for the given session.
      protected <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO>
      java.lang.Class<T>
      loadClass​(java.lang.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 Detail

      • BusinessObjectDAOFactory

        public BusinessObjectDAOFactory()
    • Method Detail

      • createDAO

        public <T extends org.bonitasoft.engine.bdm.dao.BusinessObjectDAO> T createDAO​(org.bonitasoft.engine.session.APISession session,
                                                                                       java.lang.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> java.lang.Class<T> loadClass​(java.lang.String daoClassName)
                                                                                                    throws java.lang.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:
        java.lang.ClassNotFoundException - if the daoClassName is unknown by the current Thread