Package org.drools.core.reteoo
Class QueryElementNode
- java.lang.Object
-
- org.drools.core.common.BaseNode
-
- org.drools.core.reteoo.LeftTupleSource
-
- org.drools.core.reteoo.QueryElementNode
-
- All Implemented Interfaces:
Externalizable
,Serializable
,MemoryFactory<QueryElementNode.QueryElementNodeMemory>
,NetworkNode
,LeftTupleNode
,LeftTupleSink
,LeftTupleSinkNode
,Sink
public class QueryElementNode extends LeftTupleSource implements LeftTupleSinkNode, MemoryFactory<QueryElementNode.QueryElementNodeMemory>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryElementNode.QueryElementNodeMemory
static class
QueryElementNode.UnificationNodeViewChangedEventListener
-
Field Summary
Fields Modifier and Type Field Description protected boolean
openQuery
protected QueryElement
queryElement
-
Fields inherited from class org.drools.core.reteoo.LeftTupleSource
leftDeclaredMask, leftInferredMask, leftInput, leftNegativeMask, sink
-
Fields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId, partitionsEnabled
-
-
Constructor Summary
Constructors Constructor Description QueryElementNode()
QueryElementNode(int id, LeftTupleSource tupleSource, QueryElement queryElement, boolean tupleMemoryEnabled, boolean openQuery, BuildContext context)
-
Method Summary
-
Methods inherited from class org.drools.core.reteoo.LeftTupleSource
addTupleSink, addTupleSink, addTupleSink, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftInputPattern, getLeftNegativeMask, getLeftTupleSource, getObjectCount, getObjectType, getObjectTypeForPropertyReactivity, getPathIndex, getSinkPropagator, initDeclaredMask, initInferredMask, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource, setNodeConstraintsPropertyReactiveMask, setObjectCount, setPartitionIdWithSinks, setSourcePartitionId, setSourcePartitionId
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociation, addAssociation, attach, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionId, setPartitionsEnabled, setStreamMode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleNode
getLeftTupleSource, getObjectCount, getPathIndex, getSinkPropagator, setObjectCount
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSink
getLeftInferredMask, getLeftInputOtnId, setLeftInputOtnId, setPartitionIdWithSinks
-
Methods inherited from interface org.drools.core.common.MemoryFactory
getMemoryId
-
Methods inherited from interface org.drools.core.common.NetworkNode
getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith
-
-
-
-
Field Detail
-
queryElement
protected QueryElement queryElement
-
openQuery
protected boolean openQuery
-
-
Constructor Detail
-
QueryElementNode
public QueryElementNode()
-
QueryElementNode
public QueryElementNode(int id, LeftTupleSource tupleSource, QueryElement queryElement, boolean tupleMemoryEnabled, boolean openQuery, BuildContext context)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classLeftTupleSource
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classLeftTupleSource
- Throws:
IOException
-
networkUpdated
public void networkUpdated(UpdateContext updateContext)
Description copied from class:BaseNode
A method that is called for all nodes whose network below them changed, after the change is complete, providing them with an opportunity for state update- Specified by:
networkUpdated
in classBaseNode
-
getType
public short getType()
- Specified by:
getType
in interfaceNetworkNode
- Specified by:
getType
in classLeftTupleSource
-
isLeftTupleMemoryEnabled
public boolean isLeftTupleMemoryEnabled()
- Specified by:
isLeftTupleMemoryEnabled
in interfaceLeftTupleSink
- Specified by:
isLeftTupleMemoryEnabled
in classLeftTupleSource
-
getQueryElement
public QueryElement getQueryElement()
-
isOpenQuery
public boolean isOpenQuery()
-
createFactHandle
public InternalFactHandle createFactHandle(PropagationContext context, InternalWorkingMemory workingMemory, LeftTuple leftTuple)
-
createDroolsQuery
public DroolsQuery createDroolsQuery(LeftTuple leftTuple, InternalFactHandle handle, StackEntry stackEntry, List<PathMemory> pmems, QueryElementNode.QueryElementNodeMemory qmem, LeftTupleSink sink, InternalWorkingMemory workingMemory)
-
getActualArguments
public Object[] getActualArguments(LeftTuple leftTuple, InternalWorkingMemory workingMemory)
-
createCollector
protected QueryElementNode.UnificationNodeViewChangedEventListener createCollector(LeftTuple leftTuple, int[] varIndexes, boolean tupleMemoryEnabled)
-
setLeftTupleMemoryEnabled
public void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
- Specified by:
setLeftTupleMemoryEnabled
in interfaceLeftTupleSink
-
getNextLeftTupleSinkNode
public LeftTupleSinkNode getNextLeftTupleSinkNode()
Returns the next node- Specified by:
getNextLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Returns:
- The next TupleSinkNode
-
setNextLeftTupleSinkNode
public void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
Sets the next node- Specified by:
setNextLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Parameters:
next
- The next TupleSinkNode
-
getPreviousLeftTupleSinkNode
public LeftTupleSinkNode getPreviousLeftTupleSinkNode()
Returns the previous node- Specified by:
getPreviousLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Returns:
- The previous TupleSinkNode
-
setPreviousLeftTupleSinkNode
public void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
Sets the previous node- Specified by:
setPreviousLeftTupleSinkNode
in interfaceLeftTupleSinkNode
- Parameters:
previous
- The previous TupleSinkNode
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)
- Specified by:
createLeftTuple
in interfaceLeftTupleSink
-
createMemory
public QueryElementNode.QueryElementNodeMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm)
- Specified by:
createMemory
in interfaceMemoryFactory<QueryElementNode.QueryElementNodeMemory>
-
getObjectTypeNode
public ObjectTypeNode getObjectTypeNode()
- Specified by:
getObjectTypeNode
in classBaseNode
-
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeer
in interfaceLeftTupleSink
- Specified by:
createPeer
in classLeftTupleSource
-
doAttach
public void doAttach(BuildContext context)
-
doRemove
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
Description copied from class:BaseNode
Removes the node from the network. Usually from the parentObjectSource
orTupleSource
-
-