All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ee.telekom.workflow.util.AbstractDao Maven / Gradle / Ivy

Go to download

Telekom-workflow-engine core provides the runtime environment for workflow execution together with all the supporting services (clustering, persistence, error handling etc).

There is a newer version: 1.6.3
Show newest version
package ee.telekom.workflow.util;

import javax.sql.DataSource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;

public class AbstractDao{

    private NamedParameterJdbcDaoSupport daoSupport;

    public void setDataSource( DataSource dataSource ){
        daoSupport = new NamedParameterJdbcDaoSupport();
        daoSupport.setDataSource( dataSource );
    }

    public DataSource getDataSource(){
        return daoSupport.getDataSource();
    }

    protected JdbcTemplate getJdbcTemplate(){
        return daoSupport.getJdbcTemplate();
    }

    protected NamedParameterJdbcTemplate getNamedParameterJdbcTemplate(){
        return daoSupport.getNamedParameterJdbcTemplate();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy