Package org.crank.crud

Examples of org.crank.crud.GenericDaoFactory


  }

  @SuppressWarnings("unchecked")
  public GenericDao createDao(CrudManagedObject cmo)
      throws Exception {
    GenericDaoFactory genericDaoFactory = new GenericDaoFactory();
    genericDaoFactory.setTransactionInterceptor(transactionInterceptor());
    if (cmo.getDaoInterface() == null) {
      genericDaoFactory.setInterface(GenericDao.class);
    } else {
      genericDaoFactory.setInterface(cmo.getDaoInterface());
    }
    genericDaoFactory.setQueryHints(cmo.getQueryHints());
    genericDaoFactory.setNewSelect(cmo.getNewSelect());
    genericDaoFactory.setBo(cmo.getEntityType());
    genericDaoFactory.setEntityManagerFactory(entityManagerFactory());
    genericDaoFactory.afterPropertiesSet();
    return (GenericDao) genericDaoFactory.getObject();
  }
View Full Code Here

TOP

Related Classes of org.crank.crud.GenericDaoFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.