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 QueryNode
s by using an AndNode
or
an OrNode
.
- See Also:
- Serialized Form
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
- Throws:
java.lang.IllegalArgumentException