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

ee.telekom.workflow.util.AbstractWorkflowEngineDao 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.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import ee.telekom.workflow.core.common.WorkflowEngineConfiguration;

public class AbstractWorkflowEngineDao extends AbstractDao{

    @Autowired
    private WorkflowEngineConfiguration config;

    @Override
    @Autowired
    public void setDataSource( @Qualifier("workflowengineDataSource") DataSource dataSource ){
        super.setDataSource( dataSource );
    }

    public String getCreatedOrLastUpdatedBy(){
        return config.getNodeName();
    }

    protected String getClusterName(){
        return config.getClusterName();
    }

    protected long getNextSequenceValue( String sequence ){
        return getJdbcTemplate().queryForObject( "SELECT nextval('" + sequence + "')", Long.class );
    }

    protected String getSchema() {
        return config.getSchema();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy