org.drools.examples.benchmarks.manners
Class MannersWMEL

java.lang.Object
  extended byorg.drools.event.DefaultWorkingMemoryEventListener
      extended byorg.drools.examples.benchmarks.manners.MannersWMEL
All Implemented Interfaces:
java.util.EventListener, WorkingMemoryEventListener

public class MannersWMEL
extends DefaultWorkingMemoryEventListener

A WorkingMemoryEventListener used to simulate "not" functionality not currently supported by Drools.

 

Constructor Summary
MannersWMEL()
           
 
Method Summary
static boolean chosenExists(int id, java.lang.String name, java.lang.String hobby)
          Returns true if a Chosen with the given id, name, and hobby has already been asserted.
 void objectAsserted(ObjectAssertedEvent event)
          Keeps track of asserted Path and Chosen objects.
static boolean pathExists(int id, java.lang.String name)
          Returns true if a Path with the given id and name has already been asserted.
 
Methods inherited from class org.drools.event.DefaultWorkingMemoryEventListener
activationCancelled, activationCreated, activationFired, conditionTested, objectModified, objectRetracted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MannersWMEL

public MannersWMEL()
Method Detail

objectAsserted

public void objectAsserted(ObjectAssertedEvent event)
Keeps track of asserted Path and Chosen objects.

Specified by:
objectAsserted in interface WorkingMemoryEventListener
Overrides:
objectAsserted in class DefaultWorkingMemoryEventListener

pathExists

public static boolean pathExists(int id,
                                 java.lang.String name)
Returns true if a Path with the given id and name has already been asserted.


chosenExists

public static boolean chosenExists(int id,
                                   java.lang.String name,
                                   java.lang.String hobby)
Returns true if a Chosen with the given id, name, and hobby has already been asserted.