IBM WebSphere Application ServerTM
Release 8

com.ibm.wbiserver.brules.mgmt.query
Class QueryNodeFactory

java.lang.Object
  extended by com.ibm.wbiserver.brules.mgmt.query.QueryNodeFactory

public class QueryNodeFactory
extends java.lang.Object

This is a factory class for creating different kinds of query nodes.


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String PROPERTY_NAME__DISPLAY_NAME
          The name of the system-defined property containing the display name of the object.
static java.lang.String PROPERTY_NAME__NAME
          The name of the system-defined property containing the name of the object.
static java.lang.String PROPERTY_NAME__TARGET_NAME_SPACE
          The name of the system-defined property containing the target namespace of the object.
static java.lang.String PROPERTY_NAME__VERSION
          The name of the system-defined property containing the version of the object.
 
Method Summary
static AndNode createAndNode(java.util.List<QueryNode> nodes)
          Construct an AndNode with an arbitrary number of sub-nodes.
static AndNode createAndNode(QueryNode[] nodes)
          Construct an AndNode with an arbitrary number of sub-nodes.
static AndNode createAndNode(QueryNode leftNode, QueryNode rightNode)
          Construct an AndNode with two sub-nodes.
static NotNode createNotNode(QueryNode subNode)
          Construct a NotNode.
static OrNode createOrNode(java.util.List<QueryNode> nodes)
          Construct an OrNode with an arbitrary number of sub-nodes.
static OrNode createOrNode(QueryNode[] nodes)
          Construct an OrNode with an arbitrary number of sub-nodes.
static OrNode createOrNode(QueryNode leftNode, QueryNode rightNode)
          Construct an OrNode with two sub-nodes.
static PropertyIsDefinedQueryNode createPropertyIsDefinedQueryNode(java.lang.String propertyName)
          Create PropertyIsDefinedQueryNode object.
static 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

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

PROPERTY_NAME__TARGET_NAME_SPACE

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:
Constant Field Values

PROPERTY_NAME__NAME

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:
Constant Field Values

PROPERTY_NAME__DISPLAY_NAME

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:
Constant Field Values

PROPERTY_NAME__VERSION

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:
Constant Field Values
Method Detail

createPropertyQueryNode

public static PropertyQueryNode createPropertyQueryNode(java.lang.String propertyName,
                                                        QueryOperator queryOperator,
                                                        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

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

public static AndNode createAndNode(QueryNode leftNode,
                                    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

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

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

public static OrNode createOrNode(QueryNode leftNode,
                                  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

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

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

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.

IBM WebSphere Application ServerTM
Release 8