org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter Java Examples
The following examples show how to use
org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter.
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 |
@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: JpaConfig.java From tessera with Apache License 2.0 | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactoryBean(final DataSource dataSource) { LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); localContainerEntityManagerFactoryBean.setDataSource(dataSource); localContainerEntityManagerFactoryBean.setJpaDialect(new EclipseLinkJpaDialect()); localContainerEntityManagerFactoryBean.setJpaVendorAdapter(new EclipseLinkJpaVendorAdapter()); localContainerEntityManagerFactoryBean.setJpaPropertyMap( new HashMap<String, String>() { { put("eclipselink.logging.logger", "org.eclipse.persistence.logging.slf4j.SLF4JLogger"); put("eclipselink.weaving", "false"); // put("eclipselink.logging.level.sql","FINE"); // put("eclipselink.logging.parameters","true"); put("javax.persistence.schema-generation.database.action", "create"); // put("javax.persistence.schema-generation.scripts.action", "create"); // put( // "javax.persistence.schema-generation.scripts.create-target", // "target/" + getCreateScriptName()); } }); /* <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter"> <property name="showSql" value="true"/> <property name="generateDdl" value="true"/> <property name="databasePlatform" value="org.eclipse.persistence.platform.database.H2Platform"/> </bean> </property> */ return localContainerEntityManagerFactoryBean; }
Example #3
Source File: TenancyEclipseLinkSampleApplication.java From tenancy-sample with Apache License 2.0 | 5 votes |
@Bean public EntityManagerFactory entityManagerFactory(DataSource dataSource) { LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean(); factory.setDataSource(dataSource); factory.setJpaVendorAdapter(new EclipseLinkJpaVendorAdapter()); factory.setPackagesToScan(TenancyEclipseLinkSampleApplication.class.getPackage().getName()); factory.getJpaPropertyMap().put(PersistenceUnitProperties.DDL_GENERATION_MODE, PersistenceUnitProperties.DDL_DATABASE_GENERATION); factory.getJpaPropertyMap().put(PersistenceUnitProperties.LOGGING_LEVEL, "FINE"); factory.getJpaPropertyMap().put(PersistenceUnitProperties.WEAVING, "false"); factory.getJpaPropertyMap().put(TenantHolder.TENANT_ID, TenantHolder.getTenant()); factory.afterPropertiesSet(); return factory.getObject(); }
Example #4
Source File: DatabaseConfiguration.java From multiapps-controller with Apache License 2.0 | 5 votes |
@Inject @Bean @Primary public LocalContainerEntityManagerFactoryBean defaultEntityManagerFactory(DataSource dataSource, EclipseLinkJpaVendorAdapter eclipseLinkJpaVendorAdapter) { return getLocalContainerEntityManagerFactoryBean(dataSource, eclipseLinkJpaVendorAdapter, ENTITY_MANAGER_DEFAULT_PERSISTENCE_UNIT_NAME); }
Example #5
Source File: DatabaseConfiguration.java From multiapps-controller with Apache License 2.0 | 5 votes |
protected LocalContainerEntityManagerFactoryBean getLocalContainerEntityManagerFactoryBean(DataSource dataSource, EclipseLinkJpaVendorAdapter eclipseLinkJpaVendorAdapter, String persistenceUnitName) { LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); localContainerEntityManagerFactoryBean.setPersistenceUnitName(persistenceUnitName); localContainerEntityManagerFactoryBean.setDataSource(dataSource); localContainerEntityManagerFactoryBean.setJpaVendorAdapter(eclipseLinkJpaVendorAdapter); localContainerEntityManagerFactoryBean.setPackagesToScan("com.sap.cloud.lm.sl"); return localContainerEntityManagerFactoryBean; }
Example #6
Source File: JpaConfiguration.java From example-ddd-with-spring-data-jpa with Apache License 2.0 | 5 votes |
@Bean protected EclipseLinkJpaVendorAdapter jpaVendorAdapter() { EclipseLinkJpaVendorAdapter adapter = new EclipseLinkJpaVendorAdapter(); adapter.setDatabase(Database.MYSQL); adapter.setShowSql(true); adapter.setGenerateDdl(false); return adapter; }
Example #7
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter() { private final HawkBitEclipseLinkJpaDialect jpaDialect = new HawkBitEclipseLinkJpaDialect(); @Override public EclipseLinkJpaDialect getJpaDialect() { return jpaDialect; } }; }
Example #8
Source File: EclipseLinkJpaConfiguration.java From servicecomb-pack with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #9
Source File: JpaConfiguration.java From tutorials with MIT License | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #10
Source File: KradEclipseLinkEntityManagerFactoryBean.java From rice with Educational Community License v2.0 | 4 votes |
/** * Creates a KRAD-managed {@link javax.persistence.EntityManagerFactory} factory bean. */ public KradEclipseLinkEntityManagerFactoryBean() { super.setJpaVendorAdapter(new EclipseLinkJpaVendorAdapter()); }
Example #11
Source File: EclipselinkJpaAutoconfiguration.java From booties with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #12
Source File: JpaConfiguration.java From metron with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #13
Source File: EclipseLinkJpaConfiguration.java From txle with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #14
Source File: EclipseLinkJpaConfigForTest.java From griffin with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #15
Source File: EclipseLinkJpaConfig.java From griffin with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #16
Source File: EclipseLinkJpaConfiguration.java From servicecomb-saga-actuator with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { return new EclipseLinkJpaVendorAdapter(); }
Example #17
Source File: EspmJpaConfig.java From cloud-espm-cloud-native with Apache License 2.0 | 4 votes |
@Override protected AbstractJpaVendorAdapter createJpaVendorAdapter() { EclipseLinkJpaVendorAdapter jpaVendorAdapter = new EclipseLinkJpaVendorAdapter(); return jpaVendorAdapter; }