com.ibm.websphere.brb.query
Class EndDateNode
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.EndDateNode
- All Implemented Interfaces:
- java.io.Serializable
- public class EndDateNode
- extends AbstractDateNode
Allows the endDate
attribute of a rule to be queried. An EndDateNode
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 end on January 31, 2001 at midnight:
IRuleFolder root = RuleMgmtHelper.getRootFolder();
java.util.Date date = new Date(2001, 01, 31); // defaults to midnight
EndDateNode endDateNode = new EndDateNode(date, AbstractDateNode.EQUAL);
Collection collection = root.findRules(endDateNode, true, IRule.TYPE_REFERENCE);
The following example finds all rules that end 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);
EndDateNode beginDateNode = new EndDateNode(beginDate, AbstractDateNode.AFTER_INCLUSIVE);
EndDateNode endDateNode = new EndDateNode(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 |
EndDateNode(java.util.Date searchDateIn,
int comparisonOpIn)
Constructs an EndDateNode that will search for an
end 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 |
EndDateNode
public EndDateNode(java.util.Date searchDateIn,
int comparisonOpIn)
- Constructs an
EndDateNode
that will search for an
end 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 searchDateIn
must be non-null.
A java.lang.IllegalArgumentException is thrown if this condition is not met.
- Parameters:
searchDateIn
- The date for which to search.comparisonOpIn
- The type of operation to perform. See the constants defined in this class.- Throws:
java.lang.IllegalArgumentException
-