Package org.springframework.orm.jpa

Examples of org.springframework.orm.jpa.JpaVendorAdapter


    public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
        LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
        emf.setDataSource(dataSource());
        emf.setPackagesToScan("com.captechconsulting.core.domain");

        JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
        emf.setJpaVendorAdapter(vendorAdapter);
        emf.setJpaProperties(additionalProperties());

        return emf;
    }
View Full Code Here


    public LocalContainerEntityManagerFactoryBean entityManagerFactoryBean() {
        final LocalContainerEntityManagerFactoryBean factoryBean = new LocalContainerEntityManagerFactoryBean();
        factoryBean.setDataSource(restDataSource());
        factoryBean.setPackagesToScan(new String[] { "org.rest" });

        final JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter() {
            {
                // setDatabase( Database.H2 ); // TODO: is this necessary
                setDatabasePlatform(hibernateDialect);
                setShowSql(hibernateShowSql);
                setGenerateDdl(jpaGenerateDdl);
View Full Code Here

      this.internalPersistenceUnitManager.afterPropertiesSet();
      managerToUse = this.internalPersistenceUnitManager;
    }

    this.persistenceUnitInfo = determinePersistenceUnitInfo(managerToUse);
    JpaVendorAdapter jpaVendorAdapter = getJpaVendorAdapter();
    if (jpaVendorAdapter != null && this.persistenceUnitInfo instanceof SmartPersistenceUnitInfo) {
      ((SmartPersistenceUnitInfo) this.persistenceUnitInfo).setPersistenceProviderPackageName(
          jpaVendorAdapter.getPersistenceProviderRootPackage());
    }

    PersistenceProvider provider = getPersistenceProvider();
    if (provider == null) {
      String providerClassName = this.persistenceUnitInfo.getPersistenceProviderClassName();
View Full Code Here

TOP

Related Classes of org.springframework.orm.jpa.JpaVendorAdapter

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.