T - type of reduced valuespublic abstract class ReducingAggregateLoader<T> extends AbstractAggregateLoader<T> implements ValueReducer<T>
A base class for aggregate loaders that calculate values using only the specified part of subtree.
The part of subtree to use is defined by ReductionStrategy, which is specified by type parameter in
the attribute specification.
Here and in other classes, the process of combining the current value with values calculated for partial subtree into one value is called reduction.
This class:ValueReducer,
ReductionStrategymySpec| Constructor and Description |
|---|
ReducingAggregateLoader(AttributeSpec<T> spec) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract AttributeValue<T> |
getSelfValue(AggregateAttributeContext context) |
AttributeValue<T> |
loadValue(List<AttributeValue<T>> childrenValues,
AggregateAttributeContext context)
Performs aggregate loading.
|
firstChildErrorgetAttributeSpec, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconvert, merge, merge, reducegetCachingStrategyisWholeForestDependent, preloadgetAttributeDependencies, getAttributeSpec, getContextDependencies, getGlobalTrailpublic ReducingAggregateLoader(AttributeSpec<T> spec)
public AttributeValue<T> loadValue(List<AttributeValue<T>> childrenValues, AggregateAttributeContext context)
AggregateAttributeLoaderPerforms aggregate loading.
If the value is missing or empty, the loader should return AttributeValue.undefined(). If for some reason this loader
is not applicable for the given row, it should return null. (Note, however, that if multiple aggregate loaders work on the same
attribute, it could be tricky and lead to unexpected results.)
Note: children values may contain loop markers
loadValue in interface AggregateAttributeLoader<T>childrenValues - the values of this attribute for all children rows, in the same order as the children rowscontext - loading context@NotNull protected abstract AttributeValue<T> getSelfValue(AggregateAttributeContext context)
Copyright © 2022 ALM Works. All Rights Reserved.