Package org.jrest4guice.persistence.hibernate

Examples of org.jrest4guice.persistence.hibernate.HibernateGuiceModuleProvider


  public PersistenceGuiceContext useHibernate(String... packages){
    Assert.isFalse(this.useHibernate, "已经打开了Hibernate支持");
    Assert.isFalse(this.useJPA, "已经打开了JPA支持,不能再使用Hibernate");
    this.useHibernate = true;
   
    HibernateGuiceModuleProvider hibernateGuiceModuleProvider = new HibernateGuiceModuleProvider();
    if(packages != null)
      hibernateGuiceModuleProvider.addScanPackages(packages);
   
    this.addModuleProvider(hibernateGuiceModuleProvider,new TransactionGuiceModuleProvider(new HibernateLocalTransactionInterceptor()));
    return this;
  }
View Full Code Here

TOP

Related Classes of org.jrest4guice.persistence.hibernate.HibernateGuiceModuleProvider

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.