Package org.drools.base.rule
Class MultiAccumulate
java.lang.Object
org.drools.base.rule.ConditionalElement
org.drools.base.rule.Accumulate
org.drools.base.rule.MultiAccumulate
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,PatternSource,RuleComponent,RuleConditionElement
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.drools.base.rule.Accumulate
cloned, innerDeclarationCache, requiredDeclarations, source -
Constructor Summary
ConstructorsConstructorDescriptionMultiAccumulate(RuleConditionElement source, Declaration[] requiredDeclarations, Accumulator[] accumulators, int arraySize) -
Method Summary
Modifier and TypeMethodDescriptionaccumulate(Object workingMemoryContext, Object context, BaseTuple match, FactHandle handle, ValueResolver valueResolver) Executes the accumulate (action) code for the given fact handleaccumulate(Object workingMemoryContext, BaseTuple match, FactHandle childHandle, Object groupByContext, Object tupleList, ValueResolver valueResolver) clone()Returns a clone from itselfObject[]Object[]booleanObject[]getResult(Object workingMemoryContext, Object context, BaseTuple leftTuple, ValueResolver valueResolver) Gets the result of the accumulationinthashCode()init(Object workingMemoryContext, Object accContext, Object funcContext, BaseTuple leftTuple, ValueResolver valueResolver) Executes the initialization block of codebooleanvoidvoidreplaceAccumulatorDeclaration(Declaration declaration, Declaration resolved) booleanReturns true if this accumulate supports reversebooleantryReverse(Object workingMemoryContext, Object context, BaseTuple leftTuple, FactHandle handle, BaseTuple match, ValueResolver valueResolver) Executes the reverse (action) code for the given fact handlevoidMethods inherited from class org.drools.base.rule.Accumulate
getInnerDeclarationCache, getInnerDeclarations, getNestedElements, getOuterDeclarations, getRequiredDeclarations, getSource, hasRequiredDeclarations, isGroupBy, isPatternScopeDelimiter, registerClone, replaceDeclaration, requiresLeftActivation, resolveDeclaration
-
Constructor Details
-
MultiAccumulate
public MultiAccumulate() -
MultiAccumulate
public MultiAccumulate(RuleConditionElement source, Declaration[] requiredDeclarations, Accumulator[] accumulators, int arraySize)
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classAccumulate- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classAccumulate- Throws:
IOException
-
isMultiFunction
public boolean isMultiFunction()- Specified by:
isMultiFunctionin classAccumulate
-
getAccumulators
- Specified by:
getAccumulatorsin classAccumulate
-
createFunctionContext
- Specified by:
createFunctionContextin classAccumulate
-
init
public Object init(Object workingMemoryContext, Object accContext, Object funcContext, BaseTuple leftTuple, ValueResolver valueResolver) Description copied from class:AccumulateExecutes the initialization block of code- Specified by:
initin classAccumulate
-
accumulate
public Object accumulate(Object workingMemoryContext, Object context, BaseTuple match, FactHandle handle, ValueResolver valueResolver) Description copied from class:AccumulateExecutes the accumulate (action) code for the given fact handle- Specified by:
accumulatein classAccumulate
-
accumulate
public Object accumulate(Object workingMemoryContext, BaseTuple match, FactHandle childHandle, Object groupByContext, Object tupleList, ValueResolver valueResolver) - Specified by:
accumulatein classAccumulate
-
tryReverse
public boolean tryReverse(Object workingMemoryContext, Object context, BaseTuple leftTuple, FactHandle handle, BaseTuple match, ValueResolver valueResolver) Description copied from class:AccumulateExecutes the reverse (action) code for the given fact handle- Specified by:
tryReversein classAccumulate
-
supportsReverse
public boolean supportsReverse()Description copied from class:AccumulateReturns true if this accumulate supports reverse- Specified by:
supportsReversein classAccumulate
-
getResult
public Object[] getResult(Object workingMemoryContext, Object context, BaseTuple leftTuple, ValueResolver valueResolver) Description copied from class:AccumulateGets the result of the accumulation- Specified by:
getResultin classAccumulate
-
replaceAccumulatorDeclaration
- Specified by:
replaceAccumulatorDeclarationin classAccumulate
-
clone
Description copied from interface:RuleConditionElementReturns a clone from itself- Specified by:
clonein interfaceRuleConditionElement- Specified by:
clonein classAccumulate- Returns:
-
createWorkingMemoryContext
- Specified by:
createWorkingMemoryContextin classAccumulate
-
hashCode
public int hashCode() -
equals
-