com.ibm.websphere.brb.query
Class ClassificationNode
java.lang.Object
|
+--com.ibm.websphere.brb.query.QueryNode
|
+--com.ibm.websphere.brb.query.AttributeNode
|
+--com.ibm.websphere.brb.query.AbstractStringNode
|
+--com.ibm.websphere.brb.query.ClassificationNode
- All Implemented Interfaces:
- java.io.Serializable
- public class ClassificationNode
- extends AbstractStringNode
Allows the classification
attribute of a rule to be queried.
A ClassificationNode
is given a string for which to
search and a constant describing the comparison operation to perform. These constants
are defined in superclass AbstractStringNode
. The following example
finds all rules with a classification of "Gold":
IRuleFolder root = RuleMgmtHelper.getRootFolder();
ClassificationNode node = new ClassificationNode("Gold", AbstractStringNode.EQUAL);
Collection collection = root.findRules(node, true, IRule.TYPE_REFERENCE);
The following example finds all rules with a classification of "Gold" or "Silver":
IRuleFolder root = RuleMgmtHelper.getRootFolder();
ClassificationNode goldNode = new ClassificationNode("Gold", AbstractStringNode.EQUAL);
ClassificationNode silverNode = new ClassificationNode("Silver", AbstractStringNode.EQUAL);
OrNode orNode = new OrNode(goldNode, silverNode);
Collection collection = root.findRules(orNode, true, IRule.TYPE_REFERENCE);
These nodes can be combined with other QueryNode
s by using an AndNode
or
an OrNode
.
- See Also:
- Serialized Form
Constructor Summary |
ClassificationNode(java.lang.String searchText,
int comparisonOp)
Constructs a ClassificationNode that searches
the classification field for text matching searchText
with the given string comparison operator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClassificationNode
public ClassificationNode(java.lang.String searchText,
int comparisonOp)
- Constructs a
ClassificationNode
that searches
the classification field for text matching searchText
with the given string comparison operator. Unless the operator is
IS_NULL
or IS_NOT_NULL
, the
searchText
must be non-null. A java.lang.IllegalArgumentException
is thrown if this condition is not met.
- Parameters:
searchText
- The text for which to search.comparisonOp
- The type of operation to perform.- Throws:
java.lang.IllegalArgumentException
- if the searchText
or comparisonOp
is invalid