Examples of OpenJPAVendorAdapter


Examples of org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter

  private EntityManagerFactory getEntityManagerFactory(DataSource dataSource) throws Exception {
    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setDataSource(dataSource);
    factory.setPersistenceXmlLocation("classpath:org/springframework/webflow/persistence/persistence.xml");
    OpenJpaVendorAdapter openJpa = new OpenJpaVendorAdapter();
    factory.setJpaVendorAdapter(openJpa);
    factory.afterPropertiesSet();
    return factory.getObject();
  }
View Full Code Here

Examples of org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter

  private EntityManagerFactory getEntityManagerFactory(DataSource dataSource) throws Exception {
    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setDataSource(dataSource);
    factory.setPersistenceXmlLocation("classpath:org/springframework/webflow/persistence/persistence.xml");
    OpenJpaVendorAdapter openJpa = new OpenJpaVendorAdapter();
    factory.setJpaVendorAdapter(openJpa);
    factory.afterPropertiesSet();
    return factory.getObject();
  }
View Full Code Here

Examples of org.wso2.carbon.humantask.dao.jpa.openjpa.OpenJPAVendorAdapter

     * Note: Currently we only support one JPA vendor(OpenJPA), so I have omitted vendor selection
     * logic.
     * @return JPAVendorAdapter implementation
     */
    private JPAVendorAdapter getJPAVendorAdapter(){
        JPAVendorAdapter vendorAdapter = new OpenJPAVendorAdapter();

        vendorAdapter.setDataSource(dataSource);

        // TODO: Investigate whether this could be moved to upper layer. Directly put bool into prop map.
        Object generateDDL = properties.get(Constants.PROP_ENABLE_DDL_GENERATION);
        Object showSQL = properties.get(Constants.PROP_ENABLE_SQL_TRACING);

        if(generateDDL == null){
            generateDDL = Boolean.FALSE.toString();
        }

        if(showSQL == null){
            showSQL = Boolean.FALSE.toString();
        }

        vendorAdapter.setGenerateDdl(Boolean.valueOf((String)generateDDL));
        vendorAdapter.setShowSql(Boolean.valueOf((String)showSQL));

        return vendorAdapter;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.