org.drools.spring.pojorule
Class PojoCondition

java.lang.Object
  extended by org.drools.spring.pojorule.PojoCondition
All Implemented Interfaces:
java.io.Serializable, Condition, RuleComponent

public class PojoCondition
extends java.lang.Object
implements Condition

See Also:
Serialized Form

Constructor Summary
PojoCondition(RuleReflectMethod ruleMethod)
           
 
Method Summary
 boolean equals(java.lang.Object other)
          This only compares the ruleMethod, as to facilitate node sharing in the RETE network
 java.lang.String getMethodName()
           
 Declaration[] getRequiredTupleMembers()
          Retrieve the array of Declaration s required by this condition to perform its duties.
 int hashCode()
           
 boolean isAllowed(Tuple tuple)
          Determine if the supplied Tuple is allowed by this condition.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PojoCondition

public PojoCondition(RuleReflectMethod ruleMethod)
Method Detail

getMethodName

public java.lang.String getMethodName()

getRequiredTupleMembers

public Declaration[] getRequiredTupleMembers()
Description copied from interface: Condition
Retrieve the array of Declaration s required by this condition to perform its duties.

Specified by:
getRequiredTupleMembers in interface Condition
Returns:
The array of Declarations expected on incoming Tuples.

isAllowed

public boolean isAllowed(Tuple tuple)
                  throws ConditionException
Description copied from interface: Condition
Determine if the supplied Tuple is allowed by this condition.

Specified by:
isAllowed in interface Condition
Parameters:
tuple - The Tuple to test.
Returns:
true if the Tuple passes this condition, else false.
Throws:
ConditionException - if an error occurs during filtering.

equals

public boolean equals(java.lang.Object other)
This only compares the ruleMethod, as to facilitate node sharing in the RETE network

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object