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

org.flowable.content.engine.impl.cmd.ExecuteCustomSqlCmd Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package org.flowable.content.engine.impl.cmd;

import org.flowable.content.engine.impl.util.CommandContextUtil;
import org.flowable.engine.common.impl.cmd.CustomSqlExecution;
import org.flowable.engine.common.impl.interceptor.Command;
import org.flowable.engine.common.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 = CommandContextUtil.getDbSqlSession(commandContext).getSqlSession().getMapper(mapperClass);
        return customSqlExecution.execute(mapper);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy