use of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter in project cas by apereo.
the class JpaBeans method newHibernateJpaVendorAdapter.
/**
* New hibernate jpa vendor adapter.
*
* @param databaseProperties the database properties
* @return the hibernate jpa vendor adapter
*/
public static HibernateJpaVendorAdapter newHibernateJpaVendorAdapter(final DatabaseProperties databaseProperties) {
final HibernateJpaVendorAdapter bean = new HibernateJpaVendorAdapter();
bean.setGenerateDdl(databaseProperties.isGenDdl());
bean.setShowSql(databaseProperties.isShowSql());
return bean;
}
use of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter in project av-service by dvoraka.
the class DbConfig method entityManagerFactory.
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
entityManagerFactoryBean.setDataSource(dataSource);
entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
entityManagerFactoryBean.setPackagesToScan("dvoraka.avservice.db.model");
entityManagerFactoryBean.setJpaProperties(hibernateProperties());
return entityManagerFactoryBean;
}
use of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter in project rdbcache by rdbcache.
the class Configurations method entityManagerFactory.
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
entityManagerFactoryBean.setDataSource(dataSource());
entityManagerFactoryBean.setPackagesToScan("com.rdbcache.models");
entityManagerFactoryBean.setJpaProperties(buildHibernateProperties());
entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter() {
{
setDatabase(Database.H2);
}
});
return entityManagerFactoryBean;
}
use of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter in project nikita-noark5-core by HiOA-ABI.
the class DataSourceConfig method entityManagerFactory.
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
// Scan the Noark domain model from core-common and application domain model
em.setPackagesToScan("nikita.model", "no.arkivlab.hioa.nikita.webapp.model");
final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
em.setJpaProperties(additionalProperties());
return em;
}
use of org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter in project bundle-app-ui by astrapi69.
the class PersistenceJPAConfig method entityManagerFactory.
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
// final LocalContainerEntityManagerFactoryBean em = SpringJpaFactory
// .newEntityManagerFactoryBean("bundlemanagement", dataSource(),
// SpringJpaFactory.newJpaVendorAdapter(Database.H2), jpaProperties());
LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setPersistenceUnitName("bundlemanagement");
em.setDataSource(dataSource());
em.setPackagesToScan(new String[] { "de.alpharogroup.db.resource.bundles.*", "de.alpharogroup.db.resource.bundles.*.*", "de.alpharogroup.address.book.*", "de.alpharogroup.address.book.*.*", "de.alpharogroup.resource.system.*", "de.alpharogroup.resource.system.*.*", "de.alpharogroup.user.*", "de.alpharogroup.user.*.*", "de.alpharogroup.user.management.*", "de.alpharogroup.user.management.*.*" });
JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
em.setJpaProperties(jpaProperties());
return em;
}
Aggregations