Package org.jrest4guice.persistence.jpa

Examples of org.jrest4guice.persistence.jpa.JpaGuiceModuleProvider


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

TOP

Related Classes of org.jrest4guice.persistence.jpa.JpaGuiceModuleProvider

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.