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

The following examples show how to use org.springframework.orm.jpa.vendor.EclipseLinkJpaDialect. 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: JpaConfig.java    From tessera with Apache License 2.0 5 votes vote down vote up
@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 #2
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 #3
Source File: CubaEclipseLinkJpaVendorAdapter.java    From cuba with Apache License 2.0 4 votes vote down vote up
@Override
public EclipseLinkJpaDialect getJpaDialect() {
    return jpaDialect;
}