Class AbstractNaiveDistinctAggregateLoader<T>

Object
AbstractAttributeLoader<T>
AbstractAggregateLoader<T>
AbstractNaiveDistinctAggregateLoader<T>
All Implemented Interfaces:
AggregateAttributeLoader<T>, AttributeLoader<T>, MultiRowAttributeLoader<T>, RowAttributeLoader<T>

public abstract class AbstractNaiveDistinctAggregateLoader<T> extends AbstractAggregateLoader<T>
  • Constructor Details

    • AbstractNaiveDistinctAggregateLoader

      public AbstractNaiveDistinctAggregateLoader(AttributeSpec<T> spec)
  • Method Details

    • loadValue

      public AttributeValue<T> loadValue(List<AttributeValue<T>> childrenValues, AggregateAttributeContext context)
      Description copied from interface: AggregateAttributeLoader

      Performs 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

      Parameters:
      childrenValues - the values of this attribute for all children rows, in the same order as the children rows
      context - loading context
      Returns:
      the calculated value
    • getRowValue

      protected abstract T getRowValue(RowAttributeContext context)
    • combine

      protected abstract T combine(Collection<T> values, AggregateAttributeContext context)