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

com.opendynamic.ff.query.OperationQuery Maven / Gradle / Ivy

package com.opendynamic.ff.query;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.opendynamic.ff.service.FfOperationService;
import com.opendynamic.ff.vo.Operation;

@Service
public class OperationQuery {
    private FfOperationService ffOperationService;

    private String operationId;
    private List operationIdList;
    private String operation;
    private List operationList;
    private String nodeId;
    private List nodeIdList;
    private String taskId;
    private List taskIdList;
    private String operator;
    private List operatorList;
    private String operatorName;
    private List operatorNameList;
    private Date fromOperationDate;
    private Date toOperationDate;
    private String operationStatus;
    private List operationStatusList;
    private String procId;
    private List procIdList;
    private String adjustProcDefId;
    private List adjustProcDefIdList;
    private String isolateSubProcNodeId;
    private List isolateSubProcNodeIdList;
    private String bizId;
    private List bizIdList;
    private String bizType;
    private List bizTypeList;
    private String bizCode;
    private List bizCodeList;
    private String bizName;
    private List bizNameList;
    private String bizDesc;
    private List bizDescList;
    private String procStartUser;
    private List procStartUserList;
    private String procStartUserName;
    private List procStartUserNameList;
    private String procEndUser;
    private List procEndUserList;
    private String procEndUserName;
    private List procEndUserNameList;
    private Date fromProcEndDate;
    private Date toProcEndDate;
    private String procStatus;
    private List procStatusList;
    private Date fromCreationDate;
    private Date toCreationDate;
    private String procDefId;
    private List procDefIdList;
    private String procDefCode;
    private List procDefCodeList;
    private String procDefName;
    private List procDefNameList;
    private String procDefCat;
    private List procDefCatList;
    private Integer version;
    private List versionList;
    private String procDefStatus;
    private List procDefStatusList;
    private Integer page;
    private Integer limit;
    private String dataScope;

    public OperationQuery(FfOperationService ffOperationService) {
        super();
        this.ffOperationService = ffOperationService;
    }

    public OperationQuery setOperationId(String operationId) {
        this.operationId = operationId;
        return this;
    }

    public OperationQuery setOperationIdList(List operationIdList) {
        this.operationIdList = operationIdList;
        return this;
    }

    public OperationQuery setOperation(String operation) {
        this.operation = operation;
        return this;
    }

    public OperationQuery setOperationList(List operationList) {
        this.operationList = operationList;
        return this;
    }

    public OperationQuery setNodeId(String nodeId) {
        this.nodeId = nodeId;
        return this;
    }

    public OperationQuery setNodeIdList(List nodeIdList) {
        this.nodeIdList = nodeIdList;
        return this;
    }

    public OperationQuery setTaskId(String taskId) {
        this.taskId = taskId;
        return this;
    }

    public OperationQuery setTaskIdList(List taskIdList) {
        this.taskIdList = taskIdList;
        return this;
    }

    public OperationQuery setOperator(String operator) {
        this.operator = operator;
        return this;
    }

    public OperationQuery setOperatorList(List operatorList) {
        this.operatorList = operatorList;
        return this;
    }

    public OperationQuery setOperatorName(String operatorName) {
        this.operatorName = operatorName;
        return this;
    }

    public OperationQuery setOperatorNameList(List operatorNameList) {
        this.operatorNameList = operatorNameList;
        return this;
    }

    public OperationQuery setFromOperationDate(Date fromOperationDate) {
        this.fromOperationDate = fromOperationDate;
        return this;
    }

    public OperationQuery setToOperationDate(Date toOperationDate) {
        this.toOperationDate = toOperationDate;
        return this;
    }

    public OperationQuery setOperationStatus(String operationStatus) {
        this.operationStatus = operationStatus;
        return this;
    }

    public OperationQuery setOperationStatusList(List operationStatusList) {
        this.operationStatusList = operationStatusList;
        return this;
    }

    public OperationQuery setProcId(String procId) {
        this.procId = procId;
        return this;
    }

    public OperationQuery setProcIdList(List procIdList) {
        this.procIdList = procIdList;
        return this;
    }

    public OperationQuery setAdjustProcDefId(String adjustProcDefId) {
        this.adjustProcDefId = adjustProcDefId;
        return this;
    }

    public OperationQuery setAdjustProcDefIdList(List adjustProcDefIdList) {
        this.adjustProcDefIdList = adjustProcDefIdList;
        return this;
    }

    public OperationQuery setIsolateSubProcNodeId(String isolateSubProcNodeId) {
        this.isolateSubProcNodeId = isolateSubProcNodeId;
        return this;
    }

    public OperationQuery setIsolateSubProcNodeIdList(List isolateSubProcNodeIdList) {
        this.isolateSubProcNodeIdList = isolateSubProcNodeIdList;
        return this;
    }

    public OperationQuery setBizId(String bizId) {
        this.bizId = bizId;
        return this;
    }

    public OperationQuery setBizIdList(List bizIdList) {
        this.bizIdList = bizIdList;
        return this;
    }

    public OperationQuery setBizType(String bizType) {
        this.bizType = bizType;
        return this;
    }

    public OperationQuery setBizTypeList(List bizTypeList) {
        this.bizTypeList = bizTypeList;
        return this;
    }

    public OperationQuery setBizCode(String bizCode) {
        this.bizCode = bizCode;
        return this;
    }

    public OperationQuery setBizCodeList(List bizCodeList) {
        this.bizCodeList = bizCodeList;
        return this;
    }

    public OperationQuery setBizName(String bizName) {
        this.bizName = bizName;
        return this;
    }

    public OperationQuery setBizNameList(List bizNameList) {
        this.bizNameList = bizNameList;
        return this;
    }

    public OperationQuery setBizDesc(String bizDesc) {
        this.bizDesc = bizDesc;
        return this;
    }

    public OperationQuery setBizDescList(List bizDescList) {
        this.bizDescList = bizDescList;
        return this;
    }

    public OperationQuery setProcStartUser(String procStartUser) {
        this.procStartUser = procStartUser;
        return this;
    }

    public OperationQuery setProcStartUserList(List procStartUserList) {
        this.procStartUserList = procStartUserList;
        return this;
    }

    public OperationQuery setProcStartUserName(String procStartUserName) {
        this.procStartUserName = procStartUserName;
        return this;
    }

    public OperationQuery setProcStartUserNameList(List procStartUserNameList) {
        this.procStartUserNameList = procStartUserNameList;
        return this;
    }

    public OperationQuery setProcEndUser(String procEndUser) {
        this.procEndUser = procEndUser;
        return this;
    }

    public OperationQuery setProcEndUserList(List procEndUserList) {
        this.procEndUserList = procEndUserList;
        return this;
    }

    public OperationQuery setProcEndUserName(String procEndUserName) {
        this.procEndUserName = procEndUserName;
        return this;
    }

    public OperationQuery setProcEndUserNameList(List procEndUserNameList) {
        this.procEndUserNameList = procEndUserNameList;
        return this;
    }

    public OperationQuery setFromProcEndDate(Date fromProcEndDate) {
        this.fromProcEndDate = fromProcEndDate;
        return this;
    }

    public OperationQuery setToProcEndDate(Date toProcEndDate) {
        this.toProcEndDate = toProcEndDate;
        return this;
    }

    public OperationQuery setProcStatus(String procStatus) {
        this.procStatus = procStatus;
        return this;
    }

    public OperationQuery setProcStatusList(List procStatusList) {
        this.procStatusList = procStatusList;
        return this;
    }

    public OperationQuery setFromCreationDate(Date fromCreationDate) {
        this.fromCreationDate = fromCreationDate;
        return this;
    }

    public OperationQuery setToCreationDate(Date toCreationDate) {
        this.toCreationDate = toCreationDate;
        return this;
    }

    public OperationQuery setProcDefId(String procDefId) {
        this.procDefId = procDefId;
        return this;
    }

    public OperationQuery setProcDefIdList(List procDefIdList) {
        this.procDefIdList = procDefIdList;
        return this;
    }

    public OperationQuery setProcDefCode(String procDefCode) {
        this.procDefCode = procDefCode;
        return this;
    }

    public OperationQuery setProcDefCodeList(List procDefCodeList) {
        this.procDefCodeList = procDefCodeList;
        return this;
    }

    public OperationQuery setProcDefName(String procDefName) {
        this.procDefName = procDefName;
        return this;
    }

    public OperationQuery setProcDefNameList(List procDefNameList) {
        this.procDefNameList = procDefNameList;
        return this;
    }

    public OperationQuery setProcDefCat(String procDefCat) {
        this.procDefCat = procDefCat;
        return this;
    }

    public OperationQuery setProcDefCatList(List procDefCatList) {
        this.procDefCatList = procDefCatList;
        return this;
    }

    public OperationQuery setVersion(Integer version) {
        this.version = version;
        return this;
    }

    public OperationQuery setVersionList(List versionList) {
        this.versionList = versionList;
        return this;
    }

    public OperationQuery setProcDefStatus(String procDefStatus) {
        this.procDefStatus = procDefStatus;
        return this;
    }

    public OperationQuery setProcDefStatusList(List procDefStatusList) {
        this.procDefStatusList = procDefStatusList;
        return this;
    }

    public OperationQuery setPage(Integer page) {
        this.page = page;
        return this;
    }

    public OperationQuery setLimit(Integer limit) {
        this.limit = limit;
        return this;
    }

    public OperationQuery setDataScope(String dataScope) {
        this.dataScope = dataScope;
        return this;
    }

    /**
     * 查询对象列表。对象格式为Map。
     * 
     * @return
     */
    public List> queryForMapList() {
        return ffOperationService.selectOperation(operationId, operationIdList, operation, operationList, nodeId, nodeIdList, taskId, taskIdList, operator, operatorList, operatorName, operatorNameList, fromOperationDate, toOperationDate, operationStatus, operationStatusList, procId, procIdList, adjustProcDefId, adjustProcDefIdList, isolateSubProcNodeId, isolateSubProcNodeIdList, bizId, bizIdList, bizType, bizTypeList, bizCode, bizCodeList, bizName, bizNameList, bizDesc, bizDescList, procStartUser, procStartUserList, procStartUserName, procStartUserNameList, procEndUser, procEndUserList, procEndUserName, procEndUserNameList, fromProcEndDate, toProcEndDate, procStatus, procStatusList, fromCreationDate, toCreationDate, procDefId, procDefIdList, procDefCode, procDefCodeList, procDefName,
                procDefNameList, procDefCat, procDefCatList, version, versionList, procDefStatus, procDefStatusList, page, limit, dataScope);
    }

    /**
     * 查询单个对象。对象格式为Map。
     * 
     * @return
     */
    public Map queryForMap() {
        List> result = queryForMapList();
        if (result.size() == 1) {
            return result.get(0);
        }
        else {
            return null;
        }
    }

    /**
     * 查询对象列表。对象格式为实体Bean。
     * 
     * @return
     */
    public List queryForObjectList() {
        List> result = queryForMapList();
        List operationList = new ArrayList<>();
        for (int i = 0; i < result.size(); i++) {
            operationList.add(new Operation(result.get(i)));
        }

        return operationList;
    }

    /**
     * 查询单个对象。对象格式为实体Bean。
     * 
     * @return
     */
    public Operation queryForObject() {
        List> result = queryForMapList();
        if (result.size() == 1) {
            return new Operation(result.get(0));
        }
        else {
            return null;
        }
    }

    /**
     * 查询总数。
     * 
     * @return
     */
    public int count() {
        return ffOperationService.countOperation(operationId, operationIdList, operation, operationList, nodeId, nodeIdList, taskId, taskIdList, operator, operatorList, operatorName, operatorNameList, fromOperationDate, toOperationDate, operationStatus, operationStatusList, procId, procIdList, adjustProcDefId, adjustProcDefIdList, isolateSubProcNodeId, isolateSubProcNodeIdList, bizId, bizIdList, bizType, bizTypeList, bizCode, bizCodeList, bizName, bizNameList, bizDesc, bizDescList, procStartUser, procStartUserList, procStartUserName, procStartUserNameList, procEndUser, procEndUserList, procEndUserName, procEndUserNameList, fromProcEndDate, toProcEndDate, procStatus, procStatusList, fromCreationDate, toCreationDate, procDefId, procDefIdList, procDefCode, procDefCodeList, procDefName,
                procDefNameList, procDefCat, procDefCatList, version, versionList, procDefStatus, procDefStatusList, dataScope);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy