org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter Java Examples

The following examples show how to use org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EclipseLinkConfig.java    From logging-log4j-audit with Apache License 2.0 6 votes vote down vote up
@Bean
public EntityManagerFactory entityManagerFactory() {
    LOGGER.debug("Creating EclipseLink entity manager.");
    AbstractJpaVendorAdapter vendorAdapter = new EclipseLinkJpaVendorAdapter();
    vendorAdapter.setGenerateDdl(false);
    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    Properties properties = new Properties();
    properties.setProperty("eclipselink.weaving", "static");
    factory.setJpaProperties(properties);
    factory.setJpaVendorAdapter(vendorAdapter);
    factory.setPackagesToScan("org.apache.logging.log4j.catalog");
    factory.setDataSource(dataSourceConfig.dataSource());
    factory.afterPropertiesSet();

    return factory.getObject();
}
 
Example #2
Source File: EntityManagerFactoryServiceImpl.java    From multitenant with Apache License 2.0 5 votes vote down vote up
public JpaVendorAdapter getJpaVendorAdapter(DataSource dataSource) {
	AbstractJpaVendorAdapter adapter = createJpaVendorAdapter();
	adapter.setShowSql(this.properties.isShowSql());
	adapter.setDatabase(this.properties.determineDatabase(dataSource));
	adapter.setDatabasePlatform(this.properties.getDatabasePlatform());
	adapter.setGenerateDdl(this.properties.isGenerateDdl());
	return adapter;
}
 
Example #3
Source File: LocJpaConfiguration.java    From loc-framework with MIT License 5 votes vote down vote up
@Bean
public JpaVendorAdapter jpaVendorAdapter() {
  AbstractJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();
  adapter.setShowSql(jpaProperties.isShowSql());
  adapter.setDatabase(Database.MYSQL);
  adapter.setDatabasePlatform(jpaProperties.getDatabasePlatform());
  adapter.setGenerateDdl(jpaProperties.isGenerateDdl());
  return adapter;
}
 
Example #4
Source File: HibernateConfig.java    From logging-log4j-audit with Apache License 2.0 5 votes vote down vote up
@Bean
public EntityManagerFactory entityManagerFactory() {
    AbstractJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setGenerateDdl(false);

    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setJpaVendorAdapter(vendorAdapter);
    factory.setPackagesToScan("org.apache.logging.log4j.catalog");
    factory.setDataSource(dataSourceConfig.dataSource());
    factory.afterPropertiesSet();

    return factory.getObject();
}
 
Example #5
Source File: RepositoryApplicationConfiguration.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter() {
        private final HawkBitEclipseLinkJpaDialect jpaDialect = new HawkBitEclipseLinkJpaDialect();

        @Override
        public EclipseLinkJpaDialect getJpaDialect() {
            return jpaDialect;
        }
    };
}
 
Example #6
Source File: EclipseLinkJpaConfiguration.java    From txle with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
  return new EclipseLinkJpaVendorAdapter();
}
 
Example #7
Source File: EspmJpaConfig.java    From cloud-espm-cloud-native with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    EclipseLinkJpaVendorAdapter jpaVendorAdapter = new EclipseLinkJpaVendorAdapter();
    return jpaVendorAdapter;
}
 
Example #8
Source File: EclipseLinkJpaConfiguration.java    From servicecomb-saga-actuator with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
  return new EclipseLinkJpaVendorAdapter();
}
 
Example #9
Source File: EclipseLinkJpaConfig.java    From griffin with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
 
Example #10
Source File: EclipseLinkJpaConfigForTest.java    From griffin with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
 
Example #11
Source File: EclipseLinkJpaConfiguration.java    From servicecomb-pack with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
  return new EclipseLinkJpaVendorAdapter();
}
 
Example #12
Source File: EntityManagerFactoryServiceImpl.java    From multitenant with Apache License 2.0 4 votes vote down vote up
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
	return new HibernateJpaVendorAdapter();
}
 
Example #13
Source File: Application.java    From cloud-s4-sdk-examples with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new HibernateJpaVendorAdapter();
}
 
Example #14
Source File: JpaConfiguration.java    From metron with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
  return new EclipseLinkJpaVendorAdapter();
}
 
Example #15
Source File: EclipselinkJpaAutoconfiguration.java    From booties with Apache License 2.0 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
 
Example #16
Source File: JpaConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}