Class MVELAccumulatorFunctionExecutor

    • Constructor Detail

      • MVELAccumulatorFunctionExecutor

        public MVELAccumulatorFunctionExecutor()
      • MVELAccumulatorFunctionExecutor

        public MVELAccumulatorFunctionExecutor​(MVELCompilationUnit unit,
                                               org.kie.api.runtime.rule.AccumulateFunction function)
    • Method Detail

      • createContext

        public Object createContext()
        Specified by:
        createContext in interface org.drools.core.spi.Accumulator
      • init

        public Object init​(Object workingMemoryContext,
                           Object context,
                           org.drools.core.spi.Tuple leftTuple,
                           org.drools.core.rule.Declaration[] declarations,
                           org.drools.core.WorkingMemory workingMemory)
        Specified by:
        init in interface org.drools.core.spi.Accumulator
      • accumulate

        public Object accumulate​(Object workingMemoryContext,
                                 Object context,
                                 org.drools.core.spi.Tuple tuple,
                                 org.drools.core.common.InternalFactHandle handle,
                                 org.drools.core.rule.Declaration[] declarations,
                                 org.drools.core.rule.Declaration[] innerDeclarations,
                                 org.drools.core.WorkingMemory workingMemory)
        Specified by:
        accumulate in interface org.drools.core.spi.Accumulator
      • tryReverse

        public boolean tryReverse​(Object workingMemoryContext,
                                  Object context,
                                  org.drools.core.spi.Tuple leftTuple,
                                  org.drools.core.common.InternalFactHandle handle,
                                  Object value,
                                  org.drools.core.rule.Declaration[] declarations,
                                  org.drools.core.rule.Declaration[] innerDeclarations,
                                  org.drools.core.WorkingMemory workingMemory)
        Specified by:
        tryReverse in interface org.drools.core.spi.Accumulator
      • getResult

        public Object getResult​(Object workingMemoryContext,
                                Object context,
                                org.drools.core.spi.Tuple leftTuple,
                                org.drools.core.rule.Declaration[] declarations,
                                org.drools.core.WorkingMemory workingMemory)
        Specified by:
        getResult in interface org.drools.core.spi.Accumulator
      • supportsReverse

        public boolean supportsReverse()
        Specified by:
        supportsReverse in interface org.drools.core.spi.Accumulator
      • createWorkingMemoryContext

        public Object createWorkingMemoryContext()
        Specified by:
        createWorkingMemoryContext in interface org.drools.core.spi.Accumulator
      • getRequiredDeclarations

        public org.drools.core.rule.Declaration[] getRequiredDeclarations()
        Specified by:
        getRequiredDeclarations in interface org.drools.core.spi.MvelAccumulator
      • replaceDeclaration

        public void replaceDeclaration​(org.drools.core.rule.Declaration declaration,
                                       org.drools.core.rule.Declaration resolved)
        Specified by:
        replaceDeclaration in interface org.drools.core.spi.MvelAccumulator