Java 类org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter 实例源码

项目:message-cowboy    文件:PersistenceConfiguration.java   
/**
 * 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;
}
项目:message-cowboy    文件:PersistenceTestConfiguration.java   
/**
 * 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;
}
项目:REST-Web-Services    文件:WebDatasourceConfig.java   
/**
 * 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;
}
项目:holon-datastore-jpa-querydsl    文件:TestJpaQueryDslDatastoreEclipselink.java   
@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;
}
项目:esup-ecandidat    文件:JpaConfigEcandidat.java   
/**
 * @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;
}
项目:holon-datastore-jpa    文件:TestJpaDatastoreEclipselink.java   
@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;
}
项目:example-ddd-with-spring-data-jpa    文件:JpaConfiguration.java   
@Bean
protected EclipseLinkJpaVendorAdapter jpaVendorAdapter() {
    EclipseLinkJpaVendorAdapter adapter = new EclipseLinkJpaVendorAdapter();
    adapter.setDatabase(Database.MYSQL);
    adapter.setShowSql(true);
    adapter.setGenerateDdl(false);
    return adapter;
}
项目:SpringBootMagicEightBallProject    文件:PersistenceConfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    LOGGER.info("PersistenceConfiguration.createJpaVendorAdapter()");
    EclipseLinkJpaVendorAdapter jpaVendorAdapter = new EclipseLinkJpaVendorAdapter();
    jpaVendorAdapter.setShowSql(true);
    return jpaVendorAdapter;
}
项目:hawkbit    文件:RepositoryApplicationConfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter() {
        private final HawkBitEclipseLinkJpaDialect jpaDialect = new HawkBitEclipseLinkJpaDialect();

        @Override
        public EclipseLinkJpaDialect getJpaDialect() {
            return jpaDialect;
        }
    };
}
项目:sabi    文件:EclipselinkJPAConfig.java   
@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;
}
项目:tenancy-sample    文件:TenancyEclipseLinkSampleApplication.java   
@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();
}
项目:ru.wrom.darts.statistic    文件:SpringConfig.java   
@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();
}
项目:SpringClips    文件:PersistenceConfigurarion.java   
@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;
}
项目:bookapp-nextgen    文件:PersistenceConfig.java   
@Bean
public JpaVendorAdapter jpaAdapter() {
    EclipseLinkJpaVendorAdapter eclipseLinkJpaVendorAdapter = new EclipseLinkJpaVendorAdapter();
    eclipseLinkJpaVendorAdapter.setShowSql(true);
    eclipseLinkJpaVendorAdapter.setDatabase(Database.H2);
    return eclipseLinkJpaVendorAdapter;
}
项目:incubator-servicecomb-saga    文件:EclipseLinkJpaConfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
  return new EclipseLinkJpaVendorAdapter();
}
项目:spring-data-examples    文件:Application.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
项目:track-shipments    文件:EclipseLinkJpaConfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
项目:unitils    文件:EclipseLinkJpaProviderSupport.java   
public JpaVendorAdapter getSpringJpaVendorAdaptor() {
    return new EclipseLinkJpaVendorAdapter();
}
项目:dachs    文件:EclipselinkCfg.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter()
{
    return new EclipseLinkJpaVendorAdapter();
}
项目:SpringBootMagicEightBallProject    文件:PersistenceConfigurationTest.java   
@Test
public void createJpaVendorAdapter() throws Exception {
    assertNotNull(persistenceConfiguration.createJpaVendorAdapter());
    assertTrue(persistenceConfiguration.createJpaVendorAdapter() instanceof EclipseLinkJpaVendorAdapter);
}
项目:spring-data-eclipselink    文件:SpringDataJpaEclipselinkApplication.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
项目:appverse-server    文件:TestConfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    EclipseLinkJpaVendorAdapter adapter = new EclipseLinkJpaVendorAdapter();
    return adapter;
}
项目:metron    文件:JpaConfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
  return new EclipseLinkJpaVendorAdapter();
}
项目:booties    文件:EclipselinkJpaAutoconfiguration.java   
@Override
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
    return new EclipseLinkJpaVendorAdapter();
}
项目:rice    文件:KradEclipseLinkEntityManagerFactoryBean.java   
/**
 * Creates a KRAD-managed {@link javax.persistence.EntityManagerFactory} factory bean.
 */
public KradEclipseLinkEntityManagerFactoryBean() {
    super.setJpaVendorAdapter(new EclipseLinkJpaVendorAdapter());
}