|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.websphere.brb.implementor.RuleValueForRangeNonInclusive
This rule returns a string value based on where a number falls with respect to a range. There are five constants which can be passed to this rule either as firing parameters or as initialization parameters. There is always at least one runtime firing parameter, representing the value to be compared against the range. The range does not include the lower and upper bounds.
The five constants are (in order):
The lower bound, upper bound, and value to compare must be one the following types: java.lang.Integer, java.lang.Long, java.lang.Double, java.lang.Float, java.lang.String, or java.util.Date. A String value will be converted to a Double, if possible, using Double.valueOf(). Otherwise it will be treated as a text string for comparison purposes. An exception is thrown if the values are not one of these types. Also, an exception is thrown if the three values are not compatible for comparison. For example, a Double and a Date are not compatible. The result values can be of any type.
Constructor Summary | |
RuleValueForRangeNonInclusive()
RuleValueForRange parameterless constructor. |
Method Summary | |
java.lang.Object |
fire(TriggerPoint tp,
java.lang.Object target,
IRuleCopy rule,
java.lang.Object[] parms)
This is where the algorithm implemented by this rule is performed. |
java.lang.String |
getDescription()
The programmer's description of what the algorithm does. |
void |
init(java.lang.Object[] parms,
java.lang.String[] dependentRules,
java.lang.String userDefinedData,
IRuleCopy rule)
Initializes constants used by this rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RuleValueForRangeNonInclusive()
Method Detail |
public java.lang.Object fire(TriggerPoint tp, java.lang.Object target, IRuleCopy rule, java.lang.Object[] parms) throws BusinessRuleBeansException
init
method or
whether the parameters are all passed on the fire
method. The first signature
takes 6 parameters where the first five represent the constants associated with the rule,
and the sixth the number to be evaluated. The other signature
contains only one parameter: the number to be evaluated.
The lower bound, upper bound, and value to compare must be one the following types: java.lang.Integer, java.lang.Long, java.lang.Double, java.lang.Float, java.lang.String, or java.util.Date. A String value will be converted to a Double, if possible, using Double.valueOf(). Otherwise it will be treated as a text string for comparison purposes. An exception is thrown if the values are not one of these types. Also, an exception is thrown if the three values are not compatible for comparison. For example, a Double and a Date are not compatible. The result values can be of any type.
fire
in interface RuleImplementor
com.ibm.websphere.brb.RuleImplementor
tp
- the trigger point which is firing this rule implementor.target
- the target object of the trigger pointrule
- the rule that the implementor is running on behalf offiringParams
- the firing parameters, i.e. those parameters that are passed
to the BRBeans framework at the trigger pointcom.ibm.brb.BusinessRuleBeansException
- Thrown when an error condition is associated
with the fired Rule implementation.public java.lang.String getDescription()
getDescription
in interface RuleImplementor
com.ibm.websphere.brb.RuleImplementor
public void init(java.lang.Object[] parms, java.lang.String[] dependentRules, java.lang.String userDefinedData, IRuleCopy rule) throws BusinessRuleBeansException
The lower bound and upper bound must be one the following types: java.lang.Integer, java.lang.Long, java.lang.Double, java.lang.Float, java.lang.String, or java.util.Date. A String value will be converted to a Double, if possible, using Double.valueOf(). Otherwise it will be treated as a text string for comparison purposes. An exception is thrown if the values are not one of these types. The result values can be of any type.
init
in interface RuleImplementor
com.ibm.websphere.brb.RuleImplementor
initParams
- the parameters needed to initialize this RuleImplementordependentRules
- the names of the dependent rules to this rule; if there are none,
null is passeduserDefinedData
- userDefinedData property from the Rulerule
- the Rule on whose behalf the rule implementor is running
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |