org.activiti.engine.impl.cmd.ExecuteCustomSqlCmd Maven / Gradle / Ivy
The newest version!
package org.activiti.engine.impl.cmd;
import org.activiti.engine.impl.interceptor.Command;
import org.activiti.engine.impl.interceptor.CommandContext;
/**
* @author jbarrez
*/
public class ExecuteCustomSqlCmd implements Command {
protected Class mapperClass;
protected CustomSqlExecution customSqlExecution;
public ExecuteCustomSqlCmd(Class mapperClass, CustomSqlExecution customSqlExecution) {
this.mapperClass = mapperClass;
this.customSqlExecution = customSqlExecution;
}
@Override
public ResultType execute(CommandContext commandContext) {
Mapper mapper = commandContext.getDbSqlSession().getSqlSession().getMapper(mapperClass);
return customSqlExecution.execute(mapper);
}
}