public class WorkingMemoryEntryPointAdapter extends Object implements WorkingMemoryEntryPoint
Constructor and Description |
---|
WorkingMemoryEntryPointAdapter(org.kie.api.runtime.rule.EntryPoint delegate) |
Modifier and Type | Method and Description |
---|---|
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
FactHandle s from the current session. |
<T extends FactHandle> |
getFactHandles(ObjectFilter filter)
Returns all
FactHandle s 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 . |
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()
WorkingMemoryEntryPoint
getEntryPointId
in interface WorkingMemoryEntryPoint
public FactHandle insert(Object object)
WorkingMemoryEntryPoint
insert
in interface WorkingMemoryEntryPoint
object
- the fact to be insertedpublic void retract(FactHandle handle)
WorkingMemoryEntryPoint
retract
in interface WorkingMemoryEntryPoint
handle
- the handle whose fact is to be retracted.public void update(FactHandle handle, Object object)
WorkingMemoryEntryPoint
update
in interface WorkingMemoryEntryPoint
handle
- the FactHandle for the fact to be updated.object
- the new value for the fact being updated.public FactHandle getFactHandle(Object object)
WorkingMemoryEntryPoint
getFactHandle
in interface WorkingMemoryEntryPoint
object
- the fact for which the fact handle will be returned.KnowledgeBaseConfiguration
public Object getObject(FactHandle factHandle)
WorkingMemoryEntryPoint
getObject
in interface WorkingMemoryEntryPoint
public Collection<Object> getObjects()
WorkingMemoryEntryPoint
Returns 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 WorkingMemoryEntryPoint
public Collection<Object> getObjects(ObjectFilter filter)
WorkingMemoryEntryPoint
ObjectFilter
.getObjects
in interface WorkingMemoryEntryPoint
filter
- the filter to be applied to the returned collection of facts.public <T extends FactHandle> Collection<T> getFactHandles()
WorkingMemoryEntryPoint
FactHandle
s from the current session.getFactHandles
in interface WorkingMemoryEntryPoint
public <T extends FactHandle> Collection<T> getFactHandles(ObjectFilter filter)
WorkingMemoryEntryPoint
FactHandle
s from the current session for which the facts are accepted by
the given filter.getFactHandles
in interface WorkingMemoryEntryPoint
filter
- the filter to be applied to the returned collection of FactHandle
s.public long getFactCount()
WorkingMemoryEntryPoint
getFactCount
in interface WorkingMemoryEntryPoint
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.