Class SetField
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SetField
A
Transformer that sets a field on every record to a fixed value, creating the field if needed; when
overwrite is false, records that already have the field are left unchanged.
See FieldPath for supported field name expressions.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a transformer that sets the field tovalue(an untyped null if null), overwriting any existing value.Creates a transformer that sets the field tovalue(an untyped null if null) unless it exists andoverwriteis false.Creates a transformer that sets the field tovalue, overwriting any existing value; a nullvalueis stored as a null offieldType.Creates a transformer that sets the field (created if missing) tovalueunless it exists andoverwriteis false; a nullvalueis stored as a null offieldType.SetField(FieldPath name, BigDecimal value) SetField(FieldPath name, BigDecimal value, boolean overwrite) SetField(FieldPath name, BigInteger value) SetField(FieldPath name, BigInteger value, boolean overwrite) Creates a transformer that sets the field tovalueas ajava.util.Date, overwriting any existing value.Creates a transformer that sets the field tovalueas ajava.util.Dateunless it exists andoverwriteis false.Creates a transformer that sets the field tovalueas ajava.sql.Date, overwriting any existing value.Creates a transformer that sets the field tovalueas ajava.sql.Dateunless it exists andoverwriteis false.SetField(FieldPath name, LocalDateTime value) Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone, overwriting any existing value.SetField(FieldPath name, LocalDateTime value, boolean overwrite) Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone unless it exists andoverwriteis false.Creates a transformer that sets the field tovalueas ajava.sql.Time, overwriting any existing value.Creates a transformer that sets the field tovalueas ajava.sql.Timeunless it exists andoverwriteis false.Creates a transformer that sets the field tovalue(an untyped null if null), overwriting any existing value.Creates a transformer that sets the field tovalue(an untyped null if null) unless it exists andoverwriteis false.Creates a transformer that sets the field tovalue, overwriting any existing value; a nullvalueis stored as a null offieldType.Creates a transformer that sets the field (created if missing) tovalueunless it exists andoverwriteis false; a nullvalueis stored as a null offieldType.SetField(String name, BigDecimal value) SetField(String name, BigDecimal value, boolean overwrite) SetField(String name, BigInteger value) SetField(String name, BigInteger value, boolean overwrite) Creates a transformer that sets the field tovalueas ajava.util.Date, overwriting any existing value.Creates a transformer that sets the field tovalueas ajava.util.Dateunless it exists andoverwriteis false.Creates a transformer that sets the field tovalueas ajava.sql.Date, overwriting any existing value.Creates a transformer that sets the field tovalueas ajava.sql.Dateunless it exists andoverwriteis false.SetField(String name, LocalDateTime value) Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone, overwriting any existing value.SetField(String name, LocalDateTime value, boolean overwrite) Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone unless it exists andoverwriteis false.Creates a transformer that sets the field tovalueas ajava.sql.Time, overwriting any existing value.Creates a transformer that sets the field tovalueas ajava.sql.Timeunless it exists andoverwriteis false. -
Method Summary
Methods inherited from class com.northconcepts.datapipeline.transform.Transformer
addExceptionProperties, close, geEndpoint, getEndpoint, getReader, getWriter, of, open, setWriter
-
Constructor Details
-
SetField
Creates a transformer that sets the field (created if missing) tovalueunless it exists andoverwriteis false; a nullvalueis stored as a null offieldType. -
SetField
Creates a transformer that sets the field (created if missing) tovalueunless it exists andoverwriteis false; a nullvalueis stored as a null offieldType. -
SetField
Creates a transformer that sets the field tovalue, overwriting any existing value; a nullvalueis stored as a null offieldType. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalueas ajava.util.Dateunless it exists andoverwriteis false. -
SetField
Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone unless it exists andoverwriteis false. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Dateunless it exists andoverwriteis false. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Timeunless it exists andoverwriteis false. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalue(an untyped null if null) unless it exists andoverwriteis false. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalueas ajava.util.Date, overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone, overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Date, overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Time, overwriting any existing value. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalue(an untyped null if null), overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalue, overwriting any existing value; a nullvalueis stored as a null offieldType. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalueas ajava.util.Dateunless it exists andoverwriteis false. -
SetField
Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone unless it exists andoverwriteis false. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Dateunless it exists andoverwriteis false. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Timeunless it exists andoverwriteis false. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalue(an untyped null if null) unless it exists andoverwriteis false. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalueas ajava.util.Date, overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalueas ajava.util.Datein the default time zone, overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Date, overwriting any existing value. -
SetField
Creates a transformer that sets the field tovalueas ajava.sql.Time, overwriting any existing value. -
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
-
SetField
Creates a transformer that sets the field tovalue(an untyped null if null), overwriting any existing value.
-
-
Method Details
-
getName
-
getValue
-
getFieldType
Returns the type given to the field when the value is null. -
getOverwrite
public boolean getOverwrite() -
transform
Description copied from class:TransformerApplies this transformer to a record on its way through aTransformingReaderorTransformingWriter.Contract for subclasses (see also
docs/authoring/Transformer.md):- Mutate
recordin place as needed. - Return
trueto keep the record in the pipeline. - Return
falseto drop the record (the host routes it to a discard writer if one is configured, otherwise it disappears). - Throw to fail (or route to a discard writer, depending on host configuration).
- Do not call
incrementRecordCount()on the host endpoint; the host handles it.
- Specified by:
transformin classTransformer- Throws:
Throwable
- Mutate
-
toString
-