public class NestedGetAllAggregateFunction<Node,Result> extends NestedGetFunction<Node,Result>
Function implementations that when given
the root of a collection of container nodes, need to aggregate the values of a common child element.
For example, given an array of objects that represent a person, the function can calculate the average
age of the people listed in the array if every object has the same property name for age.
The stringRootPointer value must point to a container node with one or more child elements or objects.
The pointerMap maps a child node or property found in the child object to a NestedAggregate
implementation that implements the required aggregation algorithm.
If failOnMissingNode is true and the root pointer is empty or the field pointer returns a
null value, the operation will fail.
See SimpleNestedAggregate for a convenient base implementation.
NestedGetFunction.Setter<Node>| Modifier and Type | Field and Description |
|---|---|
protected NestedAggregate<Node,?>[] |
nestedAggregates |
protected heretical.pointer.path.NestedPointer<Node,Result> |
rootPointer |
protected cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> |
streamWrapper |
failOnMissingNode, pointersnestedCoercibleType| Constructor and Description |
|---|
NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
java.lang.String stringRootPointer,
boolean failOnMissingNode,
java.util.Map<java.lang.String,NestedAggregate<Node,?>> pointerMap)
Constructor NestedGetAllAggregateFunction creates a new NestedGetAllAggregateFunction instance.
|
NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
java.lang.String stringRootPointer,
boolean failOnMissingNode,
java.lang.String[] stringPointers,
NestedAggregate<Node,?>[] nestedAggregates) |
NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
java.lang.String stringRootPointer,
cascading.tuple.Fields fieldDeclaration,
boolean failOnMissingNode,
java.lang.String[] stringPointers,
NestedAggregate<Node,?>[] nestedAggregates) |
NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
java.lang.String stringRootPointer,
cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper,
boolean failOnMissingNode,
java.util.Map<java.lang.String,NestedAggregate<Node,?>> pointerMap) |
NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
java.lang.String stringRootPointer,
cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper,
boolean failOnMissingNode,
java.lang.String[] stringPointers,
NestedAggregate<Node,?>[] nestedAggregates) |
NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
java.lang.String stringRootPointer,
cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper,
cascading.tuple.Fields fieldDeclaration,
boolean failOnMissingNode,
java.lang.String[] stringPointers,
NestedAggregate<Node,?>[] nestedAggregates) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
aggregateNode(cascading.util.Pair<NestedAggregate<Node,java.lang.Object>,java.lang.Object>[] pairs,
Node node) |
protected static <Node> NestedAggregate[] |
asArrayOf(java.util.Collection<NestedAggregate<Node,?>> nestedAggregates) |
protected static <Node> cascading.tuple.Fields |
declared(java.util.Collection<NestedAggregate<Node,?>> nestedAggregates) |
void |
operate(cascading.flow.FlowProcess flowProcess,
cascading.operation.FunctionCall<cascading.tuple.Tuple> functionCall) |
void |
prepare(cascading.flow.FlowProcess flowProcess,
cascading.operation.OperationCall<cascading.tuple.Tuple> operationCall) |
protected <Context> void |
setInto(cascading.util.Pair<NestedAggregate<Node,Context>,Context>[] pairs,
int i,
Node result) |
protected java.util.stream.Stream<Node> |
stream(Result allAt)
Applies the given stream wrapper function
|
protected void |
verify(java.lang.String[] stringPointers) |
asArray, asFields, extractResult, extractResult, setIntodeepCopy, getCoercibleType, getLiteralNode, getNestedPointerCompiler, getRootNode, iterable, sizecleanup, equals, flush, getFieldDeclaration, getNumArgs, getTrace, hashCode, isSafe, printOperationInternal, toString, toStringInternalprotected final heretical.pointer.path.NestedPointer<Node,Result> rootPointer
protected final cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper
protected final NestedAggregate<Node,?>[] nestedAggregates
public NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, java.lang.String stringRootPointer, boolean failOnMissingNode, java.util.Map<java.lang.String,NestedAggregate<Node,?>> pointerMap)
nestedCoercibleType - of type NestedCoercibleTypestringRootPointer - of type StringfailOnMissingNode - of type booleanpointerMap - of type Mappublic NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, java.lang.String stringRootPointer, cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper, boolean failOnMissingNode, java.util.Map<java.lang.String,NestedAggregate<Node,?>> pointerMap)
public NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, java.lang.String stringRootPointer, boolean failOnMissingNode, java.lang.String[] stringPointers, NestedAggregate<Node,?>[] nestedAggregates)
public NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, java.lang.String stringRootPointer, cascading.tuple.Fields fieldDeclaration, boolean failOnMissingNode, java.lang.String[] stringPointers, NestedAggregate<Node,?>[] nestedAggregates)
public NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, java.lang.String stringRootPointer, cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper, boolean failOnMissingNode, java.lang.String[] stringPointers, NestedAggregate<Node,?>[] nestedAggregates)
public NestedGetAllAggregateFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, java.lang.String stringRootPointer, cascading.operation.SerFunction<java.util.stream.Stream<Node>,java.util.stream.Stream<Node>> streamWrapper, cascading.tuple.Fields fieldDeclaration, boolean failOnMissingNode, java.lang.String[] stringPointers, NestedAggregate<Node,?>[] nestedAggregates)
protected static <Node> cascading.tuple.Fields declared(java.util.Collection<NestedAggregate<Node,?>> nestedAggregates)
protected static <Node> NestedAggregate[] asArrayOf(java.util.Collection<NestedAggregate<Node,?>> nestedAggregates)
protected void verify(java.lang.String[] stringPointers)
verify in class NestedGetFunction<Node,Result>public void prepare(cascading.flow.FlowProcess flowProcess, cascading.operation.OperationCall<cascading.tuple.Tuple> operationCall)
prepare in interface cascading.operation.Operation<cascading.tuple.Tuple>prepare in class NestedGetFunction<Node,Result>public void operate(cascading.flow.FlowProcess flowProcess, cascading.operation.FunctionCall<cascading.tuple.Tuple> functionCall)
operate in interface cascading.operation.Function<cascading.tuple.Tuple>operate in class NestedGetFunction<Node,Result>protected java.util.stream.Stream<Node> stream(Result allAt)
allAt - protected void aggregateNode(cascading.util.Pair<NestedAggregate<Node,java.lang.Object>,java.lang.Object>[] pairs, Node node)
protected <Context> void setInto(cascading.util.Pair<NestedAggregate<Node,Context>,Context>[] pairs, int i, Node result)
Copyright © 2007-2021 Cascading Maintainers. All Rights Reserved.