public class WorkingMemoryEntryPointAdapter extends Object implements WorkingMemoryEntryPoint
| Constructor and Description |
|---|
WorkingMemoryEntryPointAdapter(org.kie.api.runtime.rule.EntryPoint delegate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getEntryPointId()
Returns the String Id of this entry point
|
long |
getFactCount()
Returns the total number of facts currently in this entry point
|
FactHandle |
getFactHandle(Object object)
Returns the fact handle associated with the given object.
|
<T extends FactHandle> |
getFactHandles()
Returns all
FactHandles from the current session. |
<T extends FactHandle> |
getFactHandles(ObjectFilter filter)
Returns all
FactHandles from the current session for which the facts are accepted by
the given filter. |
Object |
getObject(FactHandle factHandle)
Returns the object associated with the given FactHandle.
|
Collection<Object> |
getObjects()
Returns all facts from the current session as a Collection.
|
Collection<Object> |
getObjects(ObjectFilter filter)
Returns all facts from the current session that are accepted by the given
ObjectFilter. |
int |
hashCode() |
FactHandle |
insert(Object object)
Inserts a new fact into this entry point
|
void |
retract(FactHandle handle)
Retracts the fact for which the given FactHandle was assigned.
|
void |
update(FactHandle handle,
Object object)
Updates the fact for which the given FactHandle was assigned with the new
fact set as the second parameter in this method.
|
public WorkingMemoryEntryPointAdapter(org.kie.api.runtime.rule.EntryPoint delegate)
public String getEntryPointId()
WorkingMemoryEntryPointgetEntryPointId in interface WorkingMemoryEntryPointpublic FactHandle insert(Object object)
WorkingMemoryEntryPointinsert in interface WorkingMemoryEntryPointobject - the fact to be insertedpublic void retract(FactHandle handle)
WorkingMemoryEntryPointretract in interface WorkingMemoryEntryPointhandle - the handle whose fact is to be retracted.public void update(FactHandle handle, Object object)
WorkingMemoryEntryPointupdate in interface WorkingMemoryEntryPointhandle - the FactHandle for the fact to be updated.object - the new value for the fact being updated.public FactHandle getFactHandle(Object object)
WorkingMemoryEntryPointgetFactHandle in interface WorkingMemoryEntryPointobject - the fact for which the fact handle will be returned.KnowledgeBaseConfigurationpublic Object getObject(FactHandle factHandle)
WorkingMemoryEntryPointgetObject in interface WorkingMemoryEntryPointpublic Collection<Object> getObjects()
WorkingMemoryEntryPointReturns all facts from the current session as a Collection.
This class is not a general-purpose Collection implementation! While this class implements the Collection interface, it intentionally violates Collection general contract, which mandates the use of the equals method when comparing objects.
Instead the approach used when comparing objects with the contains(Object) method is dependent on the WorkingMemory configuration, where it can be configured for Identity or for Equality.
getObjects in interface WorkingMemoryEntryPointpublic Collection<Object> getObjects(ObjectFilter filter)
WorkingMemoryEntryPointObjectFilter.getObjects in interface WorkingMemoryEntryPointfilter - the filter to be applied to the returned collection of facts.public <T extends FactHandle> Collection<T> getFactHandles()
WorkingMemoryEntryPointFactHandles from the current session.getFactHandles in interface WorkingMemoryEntryPointpublic <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter)
WorkingMemoryEntryPointFactHandles from the current session for which the facts are accepted by
the given filter.getFactHandles in interface WorkingMemoryEntryPointfilter - the filter to be applied to the returned collection of FactHandles.public long getFactCount()
WorkingMemoryEntryPointgetFactCount in interface WorkingMemoryEntryPointCopyright © 2001–2015 JBoss by Red Hat. All rights reserved.