com.ibm.wbiserver.brules.mgmt.query

Class QueryNodeFactory

  1. java.lang.Object
  2. extended bycom.ibm.wbiserver.brules.mgmt.query.QueryNodeFactory

  1. public class QueryNodeFactory
  2. extends java.lang.Object
This is a factory class for creating different kinds of query nodes.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
  1. static
  2. java.lang.String
PROPERTY_NAME__DISPLAY_NAME
The name of the system-defined property containing the display name of the object.
  1. static
  2. java.lang.String
PROPERTY_NAME__NAME
The name of the system-defined property containing the name of the object.
  1. static
  2. java.lang.String
PROPERTY_NAME__TARGET_NAME_SPACE
The name of the system-defined property containing the target namespace of the object.
  1. static
  2. java.lang.String
PROPERTY_NAME__VERSION
The name of the system-defined property containing the version of the object.

Method Summary

Modifier and Type Method and Description
  1. static
  2. AndNode
createAndNode(java.util.List<QueryNode> nodes)
Construct an AndNode with an arbitrary number of sub-nodes.
  1. static
  2. AndNode
createAndNode(QueryNode[] nodes)
Construct an AndNode with an arbitrary number of sub-nodes.
  1. static
  2. AndNode
createAndNode(QueryNode leftNode,QueryNode rightNode)
Construct an AndNode with two sub-nodes.
  1. static
  2. NotNode
createNotNode(QueryNode subNode)
Construct a NotNode.
  1. static
  2. OrNode
createOrNode(java.util.List<QueryNode> nodes)
Construct an OrNode with an arbitrary number of sub-nodes.
  1. static
  2. OrNode
createOrNode(QueryNode[] nodes)
Construct an OrNode with an arbitrary number of sub-nodes.
  1. static
  2. OrNode
createOrNode(QueryNode leftNode,QueryNode rightNode)
Construct an OrNode with two sub-nodes.
  1. static
  2. PropertyIsDefinedQueryNode
createPropertyIsDefinedQueryNode(java.lang.String propertyName)
Create PropertyIsDefinedQueryNode object.
  1. static
  2. PropertyQueryNode
createPropertyQueryNode(java.lang.String propertyName,QueryOperator queryOperator,java.lang.String propertyValue)
Create a PropertyQueryNode object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

PROPERTY_NAME__TARGET_NAME_SPACE

  1. public static final java.lang.String PROPERTY_NAME__TARGET_NAME_SPACE
The name of the system-defined property containing the target namespace of the object. This value can be used as the property name in queries.
See Also:

PROPERTY_NAME__NAME

  1. public static final java.lang.String PROPERTY_NAME__NAME
The name of the system-defined property containing the name of the object. This value can be used as the property name in queries.
See Also:

PROPERTY_NAME__DISPLAY_NAME

  1. public static final java.lang.String PROPERTY_NAME__DISPLAY_NAME
The name of the system-defined property containing the display name of the object. This value can be used as the property name in queries.
See Also:

PROPERTY_NAME__VERSION

  1. public static final java.lang.String PROPERTY_NAME__VERSION
The name of the system-defined property containing the version of the object. This value can be used as the property name in queries.
See Also:

Method Detail

createPropertyQueryNode

  1. public static PropertyQueryNode createPropertyQueryNode( java.lang.String propertyName,
  2. QueryOperator queryOperator,
  3. java.lang.String propertyValue)
Create a PropertyQueryNode object.
Parameters:
propertyName - The name of the property whose value is to be queried by this node. Must not be null or the zero-length string.
queryOperator - The operator for this query. Must not be null.
propertyValue - A string containing the value that is to be matched against. If a "like" query is being performed, the standard SQL wildcards, '%' and '_', can be used. The escape character, '\', can be used to specify literal '%' and '_' in the property value. If a literal '\' is to be specified, then it must also be escaped in the value, i.e. "\\". This means that an escape character in the value must always be followed by either '\', '%', or '_'. A lone escape character will result an exception. Must not be null.
Throws:
java.lang.IllegalArgumentException - if any of the arguments are null or if the propertyName argument is the zero-length string or if a lone escape character is found in the propertyValue that is not followed by '\', '%', or '_'.

createPropertyIsDefinedQueryNode

  1. public static PropertyIsDefinedQueryNode createPropertyIsDefinedQueryNode( java.lang.String propertyName)
Create PropertyIsDefinedQueryNode object.
Parameters:
propertyName - The name of the property. The query will return all business rule groups that have this property defined. Must not be null or the zero-length string.
Throws:
java.lang.IllegalArgumentException - if the propertyName argument is null or is the zero-length string.

createAndNode

  1. public static AndNode createAndNode( QueryNode leftNode,
  2. QueryNode rightNode)
Construct an AndNode with two sub-nodes. The two sub-nodes are combined using the AND logical operator. The sub-nodes can be any type of QueryNode.
Parameters:
leftNode - The node to the left of the AND operator. Must not be null.
rightNode - The node to the right of the AND operator. Must not be null.
Throws:
java.lang.IllegalArgumentException - if either input is null.

createAndNode

  1. public static AndNode createAndNode( QueryNode[] nodes)
Construct an AndNode with an arbitrary number of sub-nodes. The sub-nodes are combined using the AND logical operator between each one. The specified array must contain at least two nodes.
Parameters:
nodes - Array of sub-nodes for the AND operator. Must not be null and must contain at least two non-null nodes.
Throws:
java.lang.IllegalArgumentException - if nodes is null, if it contains less than two nodes, or if any of its elements are null.

createAndNode

  1. public static AndNode createAndNode( java.util.List<QueryNode> nodes)
Construct an AndNode with an arbitrary number of sub-nodes. The sub-nodes are combined using the AND logical operator between each one. The specified list must contain at least two nodes.
Parameters:
nodes - List of sub-nodes for the AND operator. Must not be null and must contain at least two non-null nodes.
Throws:
java.lang.IllegalArgumentException - if nodes is null, if it contains less than two nodes, or if any of its elements are null.

createOrNode

  1. public static OrNode createOrNode( QueryNode leftNode,
  2. QueryNode rightNode)
Construct an OrNode with two sub-nodes. The two sub-nodes are combined using the OR logical operator. The sub-nodes can be any type of QueryNode.
Parameters:
leftNode - The node to the left of the OR operator. Must not be null.
rightNode - The node to the right of the OR operator. Must not be null.
Throws:
java.lang.IllegalArgumentException - if either input is null.

createOrNode

  1. public static OrNode createOrNode( QueryNode[] nodes)
Construct an OrNode with an arbitrary number of sub-nodes. The sub-nodes are combined using the OR logical operator between each one. The specified array must contain at least two nodes.
Parameters:
nodes - Array of sub-nodes for the OR operator. Must not be null and must contain at least two non-null nodes.
Throws:
java.lang.IllegalArgumentException - if nodes is null, if it contains less than two nodes, or if any of its elements are null.

createOrNode

  1. public static OrNode createOrNode( java.util.List<QueryNode> nodes)
Construct an OrNode with an arbitrary number of sub-nodes. The sub-nodes are combined using the OR logical operator between each one. The specified list must contain at least two nodes.
Parameters:
nodes - List of sub-nodes for the OR operator. Must not be null and must contain at least two non-null nodes.
Throws:
java.lang.IllegalArgumentException - if nodes is null, if it contains less than two nodes, or if any of its elements are null.

createNotNode

  1. public static NotNode createNotNode( QueryNode subNode)
Construct a NotNode. The NOT operator will be applied to the result of the sub-node. The sub-node can be any type of QueryNode.
Parameters:
subNode - The node to have the NOT operator applied to it. Must not be null.
Throws:
java.lang.IllegalArgumentException - if the input is null.