com.ibm.websphere.brb.query
Class StartDateNode

java.lang.Object
  |
  +--com.ibm.websphere.brb.query.QueryNode
        |
        +--com.ibm.websphere.brb.query.AttributeNode
              |
              +--com.ibm.websphere.brb.query.AbstractDateNode
                    |
                    +--com.ibm.websphere.brb.query.StartDateNode
All Implemented Interfaces:
java.io.Serializable

public class StartDateNode
extends AbstractDateNode

Allows the startDate attribute of a rule to be queried. A StartDateNode is given a date for which to search and a constant describing the comparison operation to perform on the given date. These constants are defined in superclass AbstractDateNode. The following example finds all rules that start on January 31, 2001 at midnight:

    IRuleFolder root = RuleMgmtHelper.getRootFolder();
    java.util.Date date = new Date(2001, 01, 31); // defaults to midnight
    StartDateNode startDateNode = new StartDateNode(date, AbstractDateNode.EQUAL);
    Collection collection = root.findRules(startDateNode, true, IRule.TYPE_REFERENCE);
 
The following example finds all rules that start anytime on January 31, 2001:
    IRuleFolder root = RuleMgmtHelper.getRootFolder(); 
    java.util.Date beginDate = new Date(2001, 01, 31);
    java.util.Date endDate = new Date(2001, 02, 01);
    StartDateNode beginDateNode = new StartDateNode(beginDate, AbstractDateNode.AFTER_INCLUSIVE);
    StartDateNode endDateNode = new StartDateNode(endDate, AbstractDateNode.BEFORE_EXCLUSIVE);
    AndNode andNode = new AndNode(beginDateNode, endDateNode);
    Collection collection = root.findRules(andNode, true, IRule.TYPE_REFERENCE);
 
These nodes can be combined with other QueryNodes by using an AndNode or an OrNode.

See Also:
Serialized Form

Fields inherited from class com.ibm.websphere.brb.query.AbstractDateNode
AFTER_EXCLUSIVE, AFTER_INCLUSIVE, BEFORE_EXCLUSIVE, BEFORE_INCLUSIVE, EQUAL, IS_NOT_NULL, IS_NULL, NOT_EQUAL
 
Constructor Summary
StartDateNode(java.util.Date searchDateIn, int comparisonOpIn)
          Constructs a StartDateNode that will search for a start date matching searchDate with the given date comparison operator (see the constants defined in AbstractDateNode.
 
Methods inherited from class com.ibm.websphere.brb.query.AbstractDateNode
buildWhereClause
 
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
 

Constructor Detail

StartDateNode

public StartDateNode(java.util.Date searchDateIn,
                     int comparisonOpIn)
Constructs a StartDateNode that will search for a start date matching searchDate with the given date comparison operator (see the constants defined in AbstractDateNode. Unless the operator is IS_NULL or IS_NOT_NULL, the searchDate must be non-null. An java.lang.IllegalArgumentException is thrown if this condition is not met.
Parameters:
searchDate - The date for which to search.
comparisonOp - The type of operation to perform. See the constants defined in this class.
Throws:
java.lang.IllegalArgumentException -