public abstract class FieldTransformer extends Transformer
FieldPath for supported field name expressions.| Constructor and Description |
|---|
FieldTransformer(Collection<String> names) |
FieldTransformer(String... names) |
FieldTransformer(String name) |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception) |
Field |
getCurrentField() |
Record |
getCurrentRecord() |
String |
getName()
Returns the name of the field this transformer applies to if only one field was specified, otherwise
null if multiple fields. |
FieldPath[] |
getNames() |
String[] |
getNamesAsStrings() |
Object |
getValueOnException() |
boolean |
hasValueOnException() |
boolean |
isThrowExceptionOnMissingField()
Indicates if an exception should be thrown if the source field is missing (default to true).
|
FieldTransformer |
setThrowExceptionOnMissingField(boolean throwExceptionOnMissingField)
Indicates if an exception should be thrown if the source field is missing (default to true).
|
FieldTransformer |
setValueOnException(Object valueOnException) |
String |
toString() |
boolean |
transform(Record record) |
protected abstract void |
transformField(Field field) |
close, geEndpoint, getEndpoint, getReader, getWriter, open, setWriterpublic FieldTransformer(String... names)
public FieldTransformer(String name)
public FieldTransformer(Collection<String> names)
public String getName()
null if multiple fields.getNames(),
getNamesAsStrings()public FieldPath[] getNames()
public String[] getNamesAsStrings()
public boolean isThrowExceptionOnMissingField()
public FieldTransformer setThrowExceptionOnMissingField(boolean throwExceptionOnMissingField)
public Record getCurrentRecord()
public Field getCurrentField()
public FieldTransformer setValueOnException(Object valueOnException)
public Object getValueOnException()
public boolean hasValueOnException()
public boolean transform(Record record) throws Throwable
transform in class TransformerThrowableprotected abstract void transformField(Field field) throws Throwable
Throwablepublic DataException addExceptionProperties(DataException exception)
addExceptionProperties in class TransformerCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.