com.opendynamic.ff.query.ChildNodeQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of freeflow Show documentation
Show all versions of freeflow Show documentation
a flexible workflow engine
package com.opendynamic.ff.query;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.opendynamic.ff.service.FfNodeService;
import com.opendynamic.ff.vo.Node;
@Service
public class ChildNodeQuery {
private FfNodeService ffNodeService;
private String nodeId;
private String procId;
private List nodeTypeList;
private String nodeCode;
private List nodeStatusList;
private Boolean includeSelf;
private Boolean recursive;
public ChildNodeQuery(FfNodeService ffNodeService) {
super();
this.ffNodeService = ffNodeService;
}
public ChildNodeQuery setNodeId(String nodeId) {
this.nodeId = nodeId;
return this;
}
public ChildNodeQuery setProcId(String procId) {
this.procId = procId;
return this;
}
public ChildNodeQuery setNodeType(String nodeType) {
if (StringUtils.isNotEmpty(nodeType)) {
this.nodeTypeList = new ArrayList<>();
this.nodeTypeList.add(nodeType);
}
return this;
}
public ChildNodeQuery setNodeTypeList(List nodeTypeList) {
this.nodeTypeList = nodeTypeList;
return this;
}
public ChildNodeQuery setNodeCode(String nodeCode) {
this.nodeCode = nodeCode;
return this;
}
public ChildNodeQuery setNodeStatus(String nodeStatus) {
if (StringUtils.isNotEmpty(nodeStatus)) {
this.nodeStatusList = new ArrayList<>();
this.nodeStatusList.add(nodeStatus);
}
return this;
}
public ChildNodeQuery setNodeStatusList(List nodeStatusList) {
this.nodeStatusList = nodeStatusList;
return this;
}
/**
* 是否包含自己,默认为false。
*
* @param includeSelf
* @return
*/
public ChildNodeQuery setIncludeSelf(Boolean includeSelf) {
this.includeSelf = includeSelf;
return this;
}
/**
* 是否递归,默认为false。
*
* @param recursive
* @return
*/
public ChildNodeQuery setRecursive(Boolean recursive) {
this.recursive = recursive;
return this;
}
/**
* 查询对象列表。对象格式为Map。
*
* @return
*/
public List