本文整理汇总了Java中org.kuali.rice.kew.api.document.search.RouteNodeLookupLogic.EXACTLY属性的典型用法代码示例。如果您正苦于以下问题:Java RouteNodeLookupLogic.EXACTLY属性的具体用法?Java RouteNodeLookupLogic.EXACTLY怎么用?Java RouteNodeLookupLogic.EXACTLY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.kuali.rice.kew.api.document.search.RouteNodeLookupLogic
的用法示例。
在下文中一共展示了RouteNodeLookupLogic.EXACTLY属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDocRouteNodeSql
public String getDocRouteNodeSql(String documentTypeFullName, String routeNodeName, RouteNodeLookupLogic docRouteLevelLogic, String whereClausePredicatePrefix) {
// -1 is the default 'blank' choice from the route node drop down a number is used because the ojb RouteNode object is used to
// render the node choices on the form.
String returnSql = "";
if (StringUtils.isNotBlank(routeNodeName)) {
if (docRouteLevelLogic == null) {
docRouteLevelLogic = RouteNodeLookupLogic.EXACTLY;
}
StringBuilder routeNodeCriteria = new StringBuilder("and " + ROUTE_NODE_TABLE + ".NM ");
if (RouteNodeLookupLogic.EXACTLY == docRouteLevelLogic) {
routeNodeCriteria.append("= '" + getDbPlatform().escapeString(routeNodeName) + "' ");
} else {
routeNodeCriteria.append("in (");
// below buffer used to facilitate the addition of the string ", " to separate out route node names
StringBuilder routeNodeInCriteria = new StringBuilder();
boolean foundSpecifiedNode = false;
List<RouteNode> routeNodes = KEWServiceLocator.getRouteNodeService().getFlattenedNodes(getValidDocumentType(documentTypeFullName), true);
for (RouteNode routeNode : routeNodes) {
if (routeNodeName.equals(routeNode.getRouteNodeName())) {
// current node is specified node so we ignore it outside of the boolean below
foundSpecifiedNode = true;
continue;
}
// below logic should be to add the current node to the criteria if we haven't found the specified node
// and the logic qualifier is 'route nodes before specified'... or we have found the specified node and
// the logic qualifier is 'route nodes after specified'
if ( (!foundSpecifiedNode && RouteNodeLookupLogic.BEFORE == docRouteLevelLogic) ||
(foundSpecifiedNode && RouteNodeLookupLogic.AFTER == docRouteLevelLogic) ) {
if (routeNodeInCriteria.length() > 0) {
routeNodeInCriteria.append(", ");
}
routeNodeInCriteria.append("'" + routeNode.getRouteNodeName() + "'");
}
}
if (routeNodeInCriteria.length() > 0) {
routeNodeCriteria.append(routeNodeInCriteria);
} else {
routeNodeCriteria.append("''");
}
routeNodeCriteria.append(") ");
}
returnSql = whereClausePredicatePrefix + "DOC_HDR.DOC_HDR_ID = " + ROUTE_NODE_INST_TABLE + ".DOC_HDR_ID and " + ROUTE_NODE_INST_TABLE + ".RTE_NODE_ID = " + ROUTE_NODE_TABLE + ".RTE_NODE_ID and " + ROUTE_NODE_INST_TABLE + ".ACTV_IND = 1 " + routeNodeCriteria.toString() + " ";
}
return returnSql;
}