IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Business rule management programming > Examples > Additional Query Examples
Query business rule groups by a list of nodes that are combined with an AND operator
This is an example of a query business rule groups by a list of nodes that are combined with an AND operator.
// AND list List<QueryNode> list = new ArrayList<QueryNode>(); QueryNode rightNode = QueryNodeFactory.createPropertyQueryNode("region", QueryOperator.LIKE, "%thRegion"); list.add(rightNode); QueryNode rightNode2 = QueryNodeFactory.createPropertyQueryNode("organization", QueryOperator.LIKE, "7%"); list.add(rightNode2); QueryNode leftNode = QueryNodeFactory.createPropertyQueryNode("department", QueryOperator.LIKE, "%ing"); list.add(leftNode); QueryNode leftNode2 = QueryNodeFactory.createPropertyQueryNode("organization", QueryOperator.LIKE, "7H%"); list.add(leftNode2); AndNode andNode = QueryNodeFactory.createAndNode(list); brgList = BusinessRuleManager.getBRGsByProperties(andNode, 0, 0); // Returns BRG4