Search in sources :

Example 16 with PhreakPropagationContext

use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.

the class LeftBuilder method update.

public LeftBuilder update(Object... objects) {
    for (Object object : objects) {
        InternalFactHandle fh = (InternalFactHandle) wm.getFactHandle(object);
        LeftTuple leftTuple = fh.getFirstLeftTuple();
        leftTuple.setPropagationContext(new PhreakPropagationContext());
        leftTuples.addUpdate(leftTuple);
    }
    return this;
}
Also used : PhreakPropagationContext(org.drools.core.common.PhreakPropagationContext) InternalFactHandle(org.drools.core.common.InternalFactHandle) LeftTuple(org.drools.core.reteoo.LeftTuple)

Example 17 with PhreakPropagationContext

use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.

the class LeftBuilder method delete.

public LeftBuilder delete(Object... objects) {
    for (Object object : objects) {
        InternalFactHandle fh = (InternalFactHandle) wm.getFactHandle(object);
        LeftTuple leftTuple = fh.getFirstLeftTuple();
        leftTuple.setPropagationContext(new PhreakPropagationContext());
        leftTuples.addDelete(leftTuple);
    }
    return this;
}
Also used : PhreakPropagationContext(org.drools.core.common.PhreakPropagationContext) InternalFactHandle(org.drools.core.common.InternalFactHandle) LeftTuple(org.drools.core.reteoo.LeftTuple)

Aggregations

InternalFactHandle (org.drools.core.common.InternalFactHandle)17 PhreakPropagationContext (org.drools.core.common.PhreakPropagationContext)17 LeftTuple (org.drools.core.reteoo.LeftTuple)8 RightTuple (org.drools.core.reteoo.RightTuple)8 ArrayList (java.util.ArrayList)5 InternalWorkingMemory (org.drools.core.common.InternalWorkingMemory)4 BetaMemory (org.drools.core.reteoo.BetaMemory)4 BetaNode (org.drools.core.reteoo.BetaNode)4 RightTupleImpl (org.drools.core.reteoo.RightTupleImpl)4 TupleMemory (org.drools.core.reteoo.TupleMemory)4 Map (java.util.Map)1 QueryResultsImpl (org.drools.core.QueryResultsImpl)1 DroolsQuery (org.drools.core.base.DroolsQuery)1 NonCloningQueryViewListener (org.drools.core.base.NonCloningQueryViewListener)1 QueryRowWithSubruleIndex (org.drools.core.base.QueryRowWithSubruleIndex)1 PropagationEntry (org.drools.core.phreak.PropagationEntry)1 TerminalNode (org.drools.core.reteoo.TerminalNode)1 Declaration (org.drools.core.rule.Declaration)1 PropagationContext (org.drools.core.spi.PropagationContext)1