public abstract class NestedBaseCopyFunction<Node,Result> extends NestedSpecBaseOperation<Node,Result,NestedBaseCopyFunction.Context> implements cascading.operation.Function<NestedBaseCopyFunction.Context>
Function implementations that rely on the
CopySpec class when declaring transformations on nested object types.
Specifically, *CopyAsFunction and *CopyIntoFunction classes create or update (respectively)
nested object types from a Function argument where the field value is a nest object type.
In the case of a *CopyIntoFunction the last argument in the arguments TupleEntry will be
the object the CopySpec copies values into.
In the case of a *CopyAsFunction a new root object will be created for the CopySpec to copy values into.
Note the arguments TupleEntry will be passed to any Transform instances that are resettable
Transform.isResettable() allowing for parameterized transformations on child values as they are copied
to the new location.
In the case of JSON objects, a single JSON object is selected as an argument so that values contained in that object can be copied into the new object.
For selecting the values from multiple existing field values in order to create a new object or update an existing one
see NestedBaseBuildFunction sub-classes.
CopySpec,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected static class |
NestedBaseCopyFunction.Context |
| Modifier and Type | Field and Description |
|---|---|
protected heretical.pointer.operation.Copier<Node,Result> |
copier |
nestedCoercibleType| Constructor and Description |
|---|
NestedBaseCopyFunction(NestedCoercibleType<Node,Result> nestedCoercibleType,
cascading.tuple.Fields fieldDeclaration,
CopySpec... copySpecs) |
| Modifier and Type | Method and Description |
|---|---|
void |
operate(cascading.flow.FlowProcess flowProcess,
cascading.operation.FunctionCall<NestedBaseCopyFunction.Context> functionCall) |
void |
prepare(cascading.flow.FlowProcess flowProcess,
cascading.operation.OperationCall<NestedBaseCopyFunction.Context> operationCall) |
protected void |
resetTransforms(cascading.tuple.TupleEntry arguments,
cascading.tuple.Fields fields) |
getArgument, getResultNode, isIntodeepCopy, getCoercibleType, getLiteralNode, getNestedPointerCompiler, getRootNode, iterable, sizecleanup, equals, flush, getFieldDeclaration, getNumArgs, getTrace, hashCode, isSafe, printOperationInternal, toString, toStringInternalpublic NestedBaseCopyFunction(NestedCoercibleType<Node,Result> nestedCoercibleType, cascading.tuple.Fields fieldDeclaration, CopySpec... copySpecs)
public void prepare(cascading.flow.FlowProcess flowProcess, cascading.operation.OperationCall<NestedBaseCopyFunction.Context> operationCall)
prepare in interface cascading.operation.Operation<NestedBaseCopyFunction.Context>prepare in class NestedSpecBaseOperation<Node,Result,NestedBaseCopyFunction.Context>public void operate(cascading.flow.FlowProcess flowProcess, cascading.operation.FunctionCall<NestedBaseCopyFunction.Context> functionCall)
operate in interface cascading.operation.Function<NestedBaseCopyFunction.Context>protected void resetTransforms(cascading.tuple.TupleEntry arguments, cascading.tuple.Fields fields)
Copyright © 2007-2021 Cascading Maintainers. All Rights Reserved.