Examples of HibernateJpaVendorAdapter


Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

  @Bean
  public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
    LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
    em.setJtaDataSource(dataSource());
    em.setPackagesToScan(new String[] { "com.test.wildflytransactions" });
    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setShowSql(true);
    vendorAdapter.setGenerateDdl(true);
    em.setJpaVendorAdapter(vendorAdapter);
    em.setJpaProperties(additionalProperties());
    return em;
  }
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

      return initializer;

    }

    private JpaVendorAdapter jpaVendorAdapter() {
      HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter();
      jpaVendorAdapter.setShowSql(false);
      jpaVendorAdapter.setDatabase(Database.H2);
      return jpaVendorAdapter;
    }
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

        return emfb;
    }

    @Bean
    public JpaVendorAdapter jpaVendorAdapter() {
        return new HibernateJpaVendorAdapter();
    }
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

        return emfb;
    }

    @Bean
    public JpaVendorAdapter jpaVendorAdapter() {
        return new HibernateJpaVendorAdapter();
    }
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

    return builder.setType(EmbeddedDatabaseType.HSQL).build();
  }

  @Bean
  public EntityManagerFactory entityManagerFactory() {
    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setDatabase(Database.HSQL);
    vendorAdapter.setGenerateDdl(true);

    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setJpaVendorAdapter(vendorAdapter);
    factory.setPackagesToScan(getClass().getPackage().getName());
    factory.setDataSource(dataSource());
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

    EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
    return builder.setType(EmbeddedDatabaseType.HSQL).build();
  }

  @Bean public EntityManagerFactory entityManagerFactory() {
    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setDatabase(Database.HSQL);
    vendorAdapter.setGenerateDdl(true);

    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setJpaVendorAdapter(vendorAdapter);
    factory.setPackagesToScan(getClass().getPackage().getName());
    factory.setDataSource(dataSource());
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

  }

  @Bean
  public LocalContainerEntityManagerFactoryBean entityManagerFactory() {

    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setDatabase(Database.HSQL);
    vendorAdapter.setGenerateDdl(true);

    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setJpaVendorAdapter(vendorAdapter);
    factory.setPackagesToScan(getClass().getPackage().getName());
    factory.setPersistenceUnitName("spring-data-rest-webmvc");
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

  @DependsOn("databaseUpdater")
  public LocalContainerEntityManagerFactoryBean emf() {
    LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
    emf.setDataSource(dataSource());
    emf.setPersistenceUnitName("ngrinder");
    HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter();
    PropertiesWrapper databaseProperties = config.getDatabaseProperties();

    Database database = Database.getDatabase(databaseProperties.getProperty(PROP_DATABASE_TYPE));
    if (config.isClustered() && !database.isClusterSupport()) {
      CoreLogger.LOGGER.error("In cluster mode, H2 is not allowed to use. Please select cubrid as database");
    }
    hibernateJpaVendorAdapter.setDatabasePlatform(database.getDialect());
    hibernateJpaVendorAdapter.setShowSql(false);
    emf.setJpaVendorAdapter(hibernateJpaVendorAdapter);
    // To search entity packages from other jar files..
    emf.setPackagesToScan("empty");
    emf.setPersistenceUnitPostProcessors(new PersistenceUnitPostProcessor() {
      @Override
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

    @Bean
    public LocalContainerEntityManagerFactoryBean configureEntityManagerFactory() {
        LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
        entityManagerFactoryBean.setDataSource(configureDataSource());
        entityManagerFactoryBean.setPackagesToScan("${package}");
        entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter());

        Properties jpaProperties = new Properties();
        jpaProperties.put(org.hibernate.cfg.Environment.DIALECT, dialect);
        jpaProperties.put(org.hibernate.cfg.Environment.HBM2DDL_AUTO, hbm2ddlAuto);
        entityManagerFactoryBean.setJpaProperties(jpaProperties);
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter

  }

  @Bean
  @Scope(value = BeanDefinition.SCOPE_SINGLETON)
  public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setDatabasePlatform(determineDialect());

    LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
    emf.setJpaVendorAdapter(vendorAdapter);

    return emf;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.