Class GroupOperation<T>

java.lang.Object
com.northconcepts.datapipeline.group.GroupOperation<T>
Direct Known Subclasses:
GroupAverage, GroupCollect, GroupCount, GroupFirst, GroupLast, GroupMaximum, GroupMinimum, GroupSum

public abstract class GroupOperation<T> extends Object
See FieldPath for supported field name expressions.
  • Constructor Details

    • GroupOperation

      public GroupOperation(FieldPath sourceFieldPath, FieldPath targetFieldPath, boolean excludeNulls)
    • GroupOperation

      public GroupOperation(String sourceFieldName)
    • GroupOperation

      public GroupOperation(FieldPath sourceFieldName)
    • GroupOperation

      public GroupOperation(String sourceFieldName, String targetFieldName)
    • GroupOperation

      public GroupOperation(FieldPath sourceFieldPath, FieldPath targetFieldPath)
    • GroupOperation

      public GroupOperation(String sourceFieldName, String targetFieldName, boolean excludeNulls)
  • Method Details

    • getFilter

      public Filter getFilter()
      Returns the filter limiting which records this operation applies to or null if it applies to all of them.
    • setFilter

      public GroupOperation<T> setFilter(Filter filter)
      Sets the filter limiting which records this operation applies to; null applies it to all of them.
    • getSourceFieldPath

      public FieldPath getSourceFieldPath()
      Returns the field this operation reads or null if it reads none (as when counting records).
    • getSourceFieldName

      public String getSourceFieldName()
      Returns the field this operation reads as a string or null if it reads none (as when counting records).
    • getTargetFieldPath

      public FieldPath getTargetFieldPath()
      Returns the summary record field this operation writes to; defaults to the source field.
    • getTargetFieldName

      public String getTargetFieldName()
      Returns the summary record field this operation writes to as a string; defaults to the source field.
    • setTargetFieldName

      public GroupOperation<T> setTargetFieldName(String targetFieldName)
      Sets the summary record field this operation writes to; null or blank reverts to the source field.
    • getExcludeNulls

      public boolean getExcludeNulls()
      Indicates if this operation skips records whose source field is null (defaults to false; ignored when there is no source field).
    • setExcludeNulls

      public GroupOperation<T> setExcludeNulls(boolean excludeNulls)
      Indicates if this operation skips records whose source field is null (defaults to false; ignored when there is no source field).
    • createField

      protected abstract GroupOperationField<T> createField()
      Creates the accumulator that computes this operation's result for one group; called once per group in each window.
    • toString

      public String toString()
      Overrides:
      toString in class Object