org.drools.reteoo
Class ParameterNode

java.lang.Object
  extended by org.drools.reteoo.TupleSource
      extended by org.drools.reteoo.ParameterNode
All Implemented Interfaces:
Serializable

 class ParameterNode
extends TupleSource

Receives Objects from an ObjectTypeNode, and creates a ReteTuple, passing the result to the following node.

The ParameterNode is the first node that works in terms of Tuples. An instance of ParameterNode exists for each root fact object parameter of each rule.

Author:
bob mcwhirter
See Also:
ObjectTypeNode, TupleSink

Constructor Summary
ParameterNode(ObjectTypeNode objectTypeNode, Declaration declaration)
          Construct.
 
Method Summary
(package private)  void assertObject(FactHandle handle, Object object, WorkingMemoryImpl workingMemory)
          Assert a new fact object into this RuleBase and the specified WorkingMemory.
 void attach()
          Attaches this node into the network.
 boolean equals(Object object)
           
 Declaration getDeclaration()
          Retrieve the root fact object Declaration.
 Set getTupleDeclarations()
          Retrieve the Set of Declaration s in the propagated Tuples.
 int hashCode()
           
(package private)  void retractObject(FactHandle handle, WorkingMemoryImpl workingMemory)
          Retract a fact object from this RuleBase and the specified WorkingMemory.
 
Methods inherited from class org.drools.reteoo.TupleSource
addTupleSink, getTupleSinks, propagateAssertTuple, propagateRetractTuples
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterNode

public ParameterNode(ObjectTypeNode objectTypeNode,
                     Declaration declaration)
Construct.

Parameters:
objectTypeNode - The ObjectTypeNode input to this.
declaration - The root fact object Declaration.
Method Detail

attach

public void attach()
Description copied from class: TupleSource
Attaches this node into the network.

Specified by:
attach in class TupleSource

assertObject

void assertObject(FactHandle handle,
                  Object object,
                  WorkingMemoryImpl workingMemory)
            throws AssertionException
Assert a new fact object into this RuleBase and the specified WorkingMemory.

Parameters:
handle - The fact handle.
object - The object to assert.
workingMemory - The working memory session.
Throws:
AssertionException - if an error occurs during assertion.

retractObject

void retractObject(FactHandle handle,
                   WorkingMemoryImpl workingMemory)
             throws RetractionException
Retract a fact object from this RuleBase and the specified WorkingMemory.

Parameters:
handle - The handle to the fact to retract.
workingMemory - The working memory session.
Throws:
RetractionException - if an error occurs during retraction.

getDeclaration

public Declaration getDeclaration()
Retrieve the root fact object Declaration.

Returns:
The Declaration.

getTupleDeclarations

public Set getTupleDeclarations()
Retrieve the Set of Declaration s in the propagated Tuples.

Specified by:
getTupleDeclarations in class TupleSource
Returns:
The Set of Declarations in progated Tuples.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object


Copyright © 2001-2005 The Codehaus. All Rights Reserved.