com.ibm.websphere.brb.strategy
Class ReturnAndCombiningStrategy

java.lang.Object
  |
  +--com.ibm.websphere.brb.strategy.ReturnAndCombiningStrategy
All Implemented Interfaces:
CombiningStrategy, java.io.Serializable

public class ReturnAndCombiningStrategy
extends java.lang.Object
implements CombiningStrategy, java.io.Serializable

Returns the logical AND of all the results. The input results are expected to be of type ConstraintReturn or type Boolean. If this is not the case, a BusinessRuleBeansException is thrown. The result object returned by this combining strategy will always be a single ConstraintReturn containing the overall result, even if some or all of the input results were Booleans. Note that if the overall result is false, the result ConstraintReturn will contain the results from all dependent rules that returned failing ConstraintReturn objects. Failing rules that return Boolean will not have their results in the result ConstraintReturn.

See Also:
Serialized Form

Fields inherited from interface com.ibm.websphere.brb.CombiningStrategy
RETURN_ALL, RETURN_AND, RETURN_FIRST, RETURN_LAST, RETURN_OR, THROW_VIOLATION
 
Constructor Summary
ReturnAndCombiningStrategy()
           
 
Method Summary
 java.lang.Object combineResults(TriggerPoint tp, java.lang.Object[] results)
          Returns the logical AND of all the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnAndCombiningStrategy

public ReturnAndCombiningStrategy()
Method Detail

combineResults

public java.lang.Object combineResults(TriggerPoint tp,
                                       java.lang.Object[] results)
                                throws BusinessRuleBeansException
Returns the logical AND of all the results.

Specified by:
combineResults in interface CombiningStrategy
Following copied from interface: com.ibm.websphere.brb.CombiningStrategy
Parameters:
tp - the trigger point which is used to make this call
results - the list of results of firing the rules
Returns:
The combined result of the rules fired on this TriggerPoint call. Any type of object can be returned as the result.
Throws:
BusinessRuleBeansException - if any exceptions occur