public class NestedGetFunction<Node,Result> extends NestedBaseOperation<Node,Result,cascading.tuple.Tuple> implements cascading.operation.Function<cascading.tuple.Tuple>
Function implementations that want to simply retrieve
values in nested object trees and return them as tuple fields.
For every field named in the fieldDeclaration Fields argument, there must be a corresponding
stringPointer value.
If failOnMissingNode is true and the pointer returns a null value, the operation
will fail.
If the fieldDeclaration Fields instance declares a type information, the nestedCoercibleType will be used to coerce
any referenced child value to the expected field type.
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
NestedGetFunction.Setter<Node> |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
failOnMissingNode |
protected heretical.pointer.path.NestedPointer<Node,Result>[] |
pointers |
nestedCoercibleType| Constructor and Description |
|---|
NestedGetFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
cascading.tuple.Fields fieldDeclaration,
boolean failOnMissingNode,
java.lang.String... stringPointers)
Constructor NestedGetFunction creates a new NestedGetFunction instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String[] |
asArray(java.util.Collection<java.lang.String> values) |
protected static cascading.tuple.Fields |
asFields(java.util.Set<cascading.tuple.Fields> fields) |
protected void |
extractResult(NestedGetFunction.Setter<Node> resultSetter,
Node node) |
protected void |
extractResult(cascading.tuple.Tuple resultTuple,
Node node) |
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 void |
setInto(cascading.tuple.Tuple resultTuple,
int i,
Node result) |
protected void |
verify(java.lang.String[] stringPointers) |
deepCopy, getCoercibleType, getLiteralNode, getNestedPointerCompiler, getRootNode, iterable, sizecleanup, equals, flush, getFieldDeclaration, getNumArgs, getTrace, hashCode, isSafe, printOperationInternal, toString, toStringInternalprotected final boolean failOnMissingNode
public NestedGetFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, cascading.tuple.Fields fieldDeclaration, boolean failOnMissingNode, java.lang.String... stringPointers)
nestedCoercibleType - of NestedCoercibleTypefieldDeclaration - of FieldsfailOnMissingNode - of booleanstringPointers - of String...protected static java.lang.String[] asArray(java.util.Collection<java.lang.String> values)
protected static cascading.tuple.Fields asFields(java.util.Set<cascading.tuple.Fields> fields)
protected void verify(java.lang.String[] stringPointers)
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 cascading.operation.BaseOperation<cascading.tuple.Tuple>public void operate(cascading.flow.FlowProcess flowProcess, cascading.operation.FunctionCall<cascading.tuple.Tuple> functionCall)
operate in interface cascading.operation.Function<cascading.tuple.Tuple>protected void extractResult(cascading.tuple.Tuple resultTuple, Node node)
protected void extractResult(NestedGetFunction.Setter<Node> resultSetter, Node node)
Copyright © 2007-2021 Cascading Maintainers. All Rights Reserved.