public abstract class NestedBaseBuildFunction<Node,Result> extends NestedSpecBaseOperation<Node,Result,NestedBaseBuildFunction.Context> implements Function<NestedBaseBuildFunction.Context>
Function
implementations that rely on the
BuildSpec
class when declaring transformations on nested object types.
Specifically, *BuildAsFunction
and *BuildIntoFunction
classes create or update (respectively)
nested object types from Function argument Fields
where the field values can be primitive types, objects
(with a corresponding CoercibleType
), or themselves nest object types.
In the case of a *BuildIntoFunction
the last argument in the arguments
TupleEntry
will be
the object the BuildSpec copies values into.
In the case of a *BuildAsFunction
a new root object will be created for the BuildSpec to copy values into.
In the case of JSON objects, multiple JSON objects selected as arguments can be combined into a new JSON object by mapping the field names into locations on the new object.
For selecting the values from an existing nested object in order to create a new object or update an existing one
see NestedBaseCopyFunction
sub-classes.
BuildSpec
,
Serialized FormModifier and Type | Class and Description |
---|---|
protected static class |
NestedBaseBuildFunction.Context |
Modifier and Type | Field and Description |
---|---|
protected heretical.pointer.operation.Builder<Node,Result> |
builder |
nestedCoercibleType
fieldDeclaration, numArgs, trace
Constructor and Description |
---|
NestedBaseBuildFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
Fields fieldDeclaration,
BuildSpec... buildSpecs) |
Modifier and Type | Method and Description |
---|---|
void |
operate(FlowProcess flowProcess,
FunctionCall<NestedBaseBuildFunction.Context> functionCall) |
void |
prepare(FlowProcess flowProcess,
OperationCall<NestedBaseBuildFunction.Context> operationCall) |
getArgument, getResultNode, isInto
deepCopy, getCoercibleType, getLiteralNode, getNestedPointerCompiler, getRootNode, iterable
cleanup, equals, flush, getFieldDeclaration, getNumArgs, getTrace, hashCode, isSafe, printOperationInternal, toString, toStringInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
cleanup, flush, getFieldDeclaration, getNumArgs, isSafe
public NestedBaseBuildFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, Fields fieldDeclaration, BuildSpec... buildSpecs)
public void prepare(FlowProcess flowProcess, OperationCall<NestedBaseBuildFunction.Context> operationCall)
prepare
in interface Operation<NestedBaseBuildFunction.Context>
prepare
in class BaseOperation<NestedBaseBuildFunction.Context>
public void operate(FlowProcess flowProcess, FunctionCall<NestedBaseBuildFunction.Context> functionCall)
operate
in interface Function<NestedBaseBuildFunction.Context>
Copyright © 2007-2017 Cascading Maintainers. All Rights Reserved.