Add method setFactory to the DaoFactory