com.ibm.websphere.brb.query
Class FiringLocationNode

java.lang.Object
  extended bycom.ibm.websphere.brb.query.QueryNode
      extended bycom.ibm.websphere.brb.query.AttributeNode
          extended bycom.ibm.websphere.brb.query.FiringLocationNode
All Implemented Interfaces:
java.io.Serializable

public class FiringLocationNode
extends AttributeNode

Allows the firingLocation attribute of a rule to be queried. A FiringLocationNode is given an integer that indicates whether to search for rules fired locally, remotely, etc. These constants are defined in IRule. A constant that defines how to query the field (equal or not equal) is also passed when creating a FiringLocationNode. The following example finds rules fired locally:

    IRuleFolder root = RuleMgmtHelper.getRootFolder();
    FiringLocationNode node = new FiringLocationNode(IRule.FIRE_LOCAL);
    Collection collection = root.findRules(node, true, IRule.TYPE_REFERENCE, FiringLocationNode.EQUAL);
 
These nodes can be combined with other QueryNodes by using an AndNode or an OrNode.

See Also:
Serialized Form

Field Summary
static int EQUAL
          Find rules where the location attribute matches the specified location.
static int NOT_EQUAL
          Find rules where the location attribute does not match the specified location.
 
Constructor Summary
FiringLocationNode(int locationIn, int operationIn)
          Constructs a FiringLocationNode that searches the firing location field for rules that are fired in the given location using the given comparison operator.
 
Method Summary
 void buildWhereClause(java.lang.StringBuffer sb, java.util.Vector boundAttributes)
          FOR IBM INTERNAL USE ONLY.
 
Methods inherited from class com.ibm.websphere.brb.query.QueryNode
getWhereClause, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EQUAL

public static final int EQUAL
Find rules where the location attribute matches the specified location.

See Also:
Constant Field Values

NOT_EQUAL

public static final int NOT_EQUAL
Find rules where the location attribute does not match the specified location.

See Also:
Constant Field Values
Constructor Detail

FiringLocationNode

public FiringLocationNode(int locationIn,
                          int operationIn)
Constructs a FiringLocationNode that searches the firing location field for rules that are fired in the given location using the given comparison operator. The constants for the locationIn are defined in IRule. The constants for the operationIn are defined in this class.

Parameters:
locationIn - search for rules fired in this location
operationIn - the type of comparison to perform
Throws:
java.lang.IllegalArgumentException - if the given firing location is not valid
Method Detail

buildWhereClause

public void buildWhereClause(java.lang.StringBuffer sb,
                             java.util.Vector boundAttributes)
FOR IBM INTERNAL USE ONLY.