Class AbstractCollectNumberHitPolicyHandler
- java.lang.Object
-
- org.camunda.bpm.dmn.engine.impl.hitpolicy.AbstractCollectNumberHitPolicyHandler
-
- All Implemented Interfaces:
DmnHitPolicyHandler
- Direct Known Subclasses:
CollectCountHitPolicyHandler
,CollectMaxHitPolicyHandler
,CollectMinHitPolicyHandler
,CollectSumHitPolicyHandler
public abstract class AbstractCollectNumberHitPolicyHandler extends java.lang.Object implements DmnHitPolicyHandler
-
-
Field Summary
Fields Modifier and Type Field Description static DmnHitPolicyLogger
LOG
-
Constructor Summary
Constructors Constructor Description AbstractCollectNumberHitPolicyHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Double
aggregateDoubleValues(java.util.List<java.lang.Double> doubleValues)
protected abstract java.lang.Integer
aggregateIntegerValues(java.util.List<java.lang.Integer> intValues)
protected abstract java.lang.Long
aggregateLongValues(java.util.List<java.lang.Long> longValues)
protected TypedValue
aggregateNumberValues(java.util.List<TypedValue> values)
protected TypedValue
aggregateValues(java.util.List<TypedValue> values)
DmnDecisionTableEvaluationEvent
apply(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
Applies hit policy.protected java.util.List<TypedValue>
collectSingleValues(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
protected java.util.List<java.lang.Double>
convertValuesToDouble(java.util.List<TypedValue> typedValues)
protected java.util.List<java.lang.Integer>
convertValuesToInteger(java.util.List<TypedValue> typedValues)
protected java.util.List<java.lang.Long>
convertValuesToLong(java.util.List<TypedValue> typedValues)
protected abstract BuiltinAggregator
getAggregator()
protected java.lang.String
getResultName(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
protected TypedValue
getResultValue(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.dmn.engine.impl.spi.hitpolicy.DmnHitPolicyHandler
getHitPolicyEntry
-
-
-
-
Field Detail
-
LOG
public static final DmnHitPolicyLogger LOG
-
-
Method Detail
-
getAggregator
protected abstract BuiltinAggregator getAggregator()
-
apply
public DmnDecisionTableEvaluationEvent apply(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
Description copied from interface:DmnHitPolicyHandler
Applies hit policy. Depending on the hit policy this can mean filtering and sorting of matching rules or aggregating results.- Specified by:
apply
in interfaceDmnHitPolicyHandler
- Parameters:
decisionTableEvaluationEvent
- the evaluation event of the decision table- Returns:
- the final evaluation result
-
getResultName
protected java.lang.String getResultName(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
-
getResultValue
protected TypedValue getResultValue(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
-
collectSingleValues
protected java.util.List<TypedValue> collectSingleValues(DmnDecisionTableEvaluationEvent decisionTableEvaluationEvent)
-
aggregateValues
protected TypedValue aggregateValues(java.util.List<TypedValue> values)
-
aggregateNumberValues
protected TypedValue aggregateNumberValues(java.util.List<TypedValue> values)
-
aggregateIntegerValues
protected abstract java.lang.Integer aggregateIntegerValues(java.util.List<java.lang.Integer> intValues)
-
aggregateLongValues
protected abstract java.lang.Long aggregateLongValues(java.util.List<java.lang.Long> longValues)
-
aggregateDoubleValues
protected abstract java.lang.Double aggregateDoubleValues(java.util.List<java.lang.Double> doubleValues)
-
convertValuesToInteger
protected java.util.List<java.lang.Integer> convertValuesToInteger(java.util.List<TypedValue> typedValues) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
convertValuesToLong
protected java.util.List<java.lang.Long> convertValuesToLong(java.util.List<TypedValue> typedValues) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
convertValuesToDouble
protected java.util.List<java.lang.Double> convertValuesToDouble(java.util.List<TypedValue> typedValues) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-