ee.telekom.workflow.util.AbstractDao Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of workflow-engine Show documentation
Show all versions of workflow-engine Show documentation
Telekom-workflow-engine core provides the runtime environment for workflow execution together with all the supporting services (clustering, persistence, error handling etc).
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();
}
}