本文整理汇总了Java中org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter类的典型用法代码示例。如果您正苦于以下问题:Java EclipseLinkJpaVendorAdapter类的具体用法?Java EclipseLinkJpaVendorAdapter怎么用?Java EclipseLinkJpaVendorAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EclipseLinkJpaVendorAdapter类属于org.springframework.orm.jpa.vendor包,在下文中一共展示了EclipseLinkJpaVendorAdapter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
/**
* JPA entity manager factory bean.
* Depends on the hsqlDbServer bean, in order to create the embedded
* database, if one is to be used, before the entity manager factory.
*/
@Bean
@DependsOn("hsqlDbServer")
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
/* JPA entity manager factory. */
final LocalContainerEntityManagerFactoryBean theJpaEntityManagerFactory =
new LocalContainerEntityManagerFactoryBean();
theJpaEntityManagerFactory.setDataSource(dataSource());
theJpaEntityManagerFactory.setPersistenceUnitName("message-cowboy");
theJpaEntityManagerFactory.setJpaProperties(jpaProperties());
/* JPA vendor adapter. */
final EclipseLinkJpaVendorAdapter theJpaVendorAdapter =
new EclipseLinkJpaVendorAdapter();
theJpaVendorAdapter.setShowSql(true);
theJpaEntityManagerFactory.setJpaVendorAdapter(theJpaVendorAdapter);
return theJpaEntityManagerFactory;
}
示例2: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
/**
* JPA entity manager factory bean.
*/
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
/* JPA entity manager factory. */
final LocalContainerEntityManagerFactoryBean theJpaEntityManagerFactory =
new LocalContainerEntityManagerFactoryBean();
theJpaEntityManagerFactory.setDataSource(dataSource());
theJpaEntityManagerFactory.setPersistenceUnitName("message-cowboy");
theJpaEntityManagerFactory.setJpaProperties(jpaProperties());
/* JPA vendor adapter. */
final EclipseLinkJpaVendorAdapter theJpaVendorAdapter =
new EclipseLinkJpaVendorAdapter();
theJpaVendorAdapter.setShowSql(true);
theJpaEntityManagerFactory.setJpaVendorAdapter(theJpaVendorAdapter);
return theJpaEntityManagerFactory;
}
示例3: getEclipseLinkJpaVendorAdapter
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
/**
* Exposes EclipseLink's persistence provider and EntityManager extension interface,
* and adapts AbstractJpaVendorAdapter's common configuration settings.
*/
@Bean
public EclipseLinkJpaVendorAdapter getEclipseLinkJpaVendorAdapter() {
final EclipseLinkJpaVendorAdapter vendorAdapter = new EclipseLinkJpaVendorAdapter();
vendorAdapter.setDatabasePlatform(eclipseLinkProperties.getDatabasePlatform());
vendorAdapter.setGenerateDdl(eclipseLinkProperties.isGenerateDll());
vendorAdapter.setShowSql(eclipseLinkProperties.isShowSql());
return vendorAdapter;
}
示例4: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
public FactoryBean<EntityManagerFactory> entityManagerFactory() {
LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
emf.setDataSource(dataSource());
emf.setJpaVendorAdapter(new EclipseLinkJpaVendorAdapter());
emf.setPackagesToScan(TestJpaDomain.class.getPackage().getName());
emf.setPersistenceUnitName("test");
emf.getJpaPropertyMap().put("eclipselink.weaving", "false");
return emf;
}
开发者ID:holon-platform,项目名称:holon-datastore-jpa-querydsl,代码行数:14,代码来源:TestJpaQueryDslDatastoreEclipselink.java
示例5: entityManagerFactoryEcandidat
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
/**
* @return EntityManager Factory
*/
@Bean(name = "entityManagerFactoryEcandidat")
public LocalContainerEntityManagerFactoryBean entityManagerFactoryEcandidat() {
DataSource ds = dataSourceEcandidat();
/* Si l'appli s'initialise, il faut lancer Flyway */
/**
* TODO:problème avec tomcat8 qui reinitialise les beans au shutdown et met
* flyway en erreur
*/
String init = System.getProperty(ConstanteUtils.STARTUP_INIT_FLYWAY);
if (init == null || !init.equals(ConstanteUtils.STARTUP_INIT_FLYWAY_OK)) {
initFlyway(ds);
System.setProperty(ConstanteUtils.STARTUP_INIT_FLYWAY, ConstanteUtils.STARTUP_INIT_FLYWAY_OK);
}
LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
localContainerEntityManagerFactoryBean.setPersistenceUnitName(PERSISTENCE_UNIT_NAME);
localContainerEntityManagerFactoryBean.setPackagesToScan(Candidat.class.getPackage().getName(),
LocalTimePersistenceConverter.class.getPackage().getName());
localContainerEntityManagerFactoryBean.setDataSource(ds);
localContainerEntityManagerFactoryBean.setJpaDialect(new EclipseLinkJpaDialect());
Properties jpaProperties = new Properties();
/* Active le static weaving d'EclipseLink */
jpaProperties.put(PersistenceUnitProperties.WEAVING, "static");
/* Désactive le cache partagé */
jpaProperties.put(PersistenceUnitProperties.CACHE_SHARED_DEFAULT, String.valueOf(false));
localContainerEntityManagerFactoryBean.setJpaProperties(jpaProperties);
EclipseLinkJpaVendorAdapter jpaVendorAdapter = new EclipseLinkJpaVendorAdapter();
jpaVendorAdapter.setGenerateDdl(false);
jpaVendorAdapter.setShowSql(false);
localContainerEntityManagerFactoryBean.setJpaVendorAdapter(jpaVendorAdapter);
return localContainerEntityManagerFactoryBean;
}
示例6: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
public FactoryBean<EntityManagerFactory> entityManagerFactory() {
LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
emf.setDataSource(dataSource());
EclipseLinkJpaVendorAdapter va = new EclipseLinkJpaVendorAdapter();
va.setShowSql(true);
emf.setJpaVendorAdapter(va);
emf.setPackagesToScan(TestJpaDomain.class.getPackage().getName());
emf.setPersistenceUnitName("test");
emf.getJpaPropertyMap().put("eclipselink.weaving", "false");
return emf;
}
示例7: jpaVendorAdapter
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
protected EclipseLinkJpaVendorAdapter jpaVendorAdapter() {
EclipseLinkJpaVendorAdapter adapter = new EclipseLinkJpaVendorAdapter();
adapter.setDatabase(Database.MYSQL);
adapter.setShowSql(true);
adapter.setGenerateDdl(false);
return adapter;
}
示例8: createJpaVendorAdapter
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
LOGGER.info("PersistenceConfiguration.createJpaVendorAdapter()");
EclipseLinkJpaVendorAdapter jpaVendorAdapter = new EclipseLinkJpaVendorAdapter();
jpaVendorAdapter.setShowSql(true);
return jpaVendorAdapter;
}
示例9: createJpaVendorAdapter
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
return new EclipseLinkJpaVendorAdapter() {
private final HawkBitEclipseLinkJpaDialect jpaDialect = new HawkBitEclipseLinkJpaDialect();
@Override
public EclipseLinkJpaDialect getJpaDialect() {
return jpaDialect;
}
};
}
示例10: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
em.setPackagesToScan(new String[]{"de.bluewhale.sabi.persistence.model"});
em.setPersistenceUnitName("sabi");
// JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
JpaVendorAdapter vendorAdapter = new EclipseLinkJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
em.setJpaProperties(additionalProperties());
return em;
}
示例11: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@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();
}
示例12: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
public EntityManagerFactory entityManagerFactory() {
LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
EclipseLinkJpaVendorAdapter vendorAdapter = new EclipseLinkJpaVendorAdapter();
vendorAdapter.setDatabasePlatform("org.eclipse.persistence.platform.database.H2Platform");
//vendorAdapter.setGenerateDdl(true);
factory.setPersistenceXmlLocation("eclipselink-persistence.xml");
factory.setDataSource(dataSource());
//factory.setPackagesToScan("ru.wrom.darts.statistic.persist");
// factory.setLoadTimeWeaver(loadTimeWeaver());
factory.setJpaVendorAdapter(vendorAdapter);
factory.afterPropertiesSet();
return factory.getObject();
}
示例13: entityManagerFactory
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final EclipseLinkJpaVendorAdapter vendorAdapter = new EclipseLinkJpaVendorAdapter();
vendorAdapter.setDatabase(Database.DERBY);
vendorAdapter.setGenerateDdl(true);
final LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
factory.setJpaVendorAdapter(vendorAdapter);
factory.setPackagesToScan(getClass().getPackage().getName());
factory.setDataSource(dataSource());
return factory;
}
示例14: jpaAdapter
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Bean
public JpaVendorAdapter jpaAdapter() {
EclipseLinkJpaVendorAdapter eclipseLinkJpaVendorAdapter = new EclipseLinkJpaVendorAdapter();
eclipseLinkJpaVendorAdapter.setShowSql(true);
eclipseLinkJpaVendorAdapter.setDatabase(Database.H2);
return eclipseLinkJpaVendorAdapter;
}
示例15: createJpaVendorAdapter
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter; //导入依赖的package包/类
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
return new EclipseLinkJpaVendorAdapter();
}