Annotation Type DataField
-
@Documented @Retention(RUNTIME) public @interface DataField
An annotation used to identify in a POJO which property is link to a field of a record (csv, ...). The pos (mandatory) identifies the position of the data in the record The name is optional and could be used in the future to bind a property which a different name The columnName (optional) represents the name of the column who will appear in the header The pattern (optional) allows to define the pattern of the data (useful for Date, ...) The length (optional) allows to define for fixed length message the size of the data's block The precision(optional) reflects the precision to be used with BigDecimal number The position (optional) identify the position of the field in the CSV generated The required (optional) property identifies a field which is mandatory. The lengthPos (optional) identifies a field in this record that defines the fixed length for this field. The delimiter (optional) defines a character that is used to demarcate the field, if it has a variable length.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description int
pos
Position of the data in the input record, must start from 1 (mandatory).
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
align
Align the text to the right or left.boolean
clip
Indicates to clip data in the field if it exceeds the allowed length when using fixed length.String
columnName
Name of the header column (optional).String
decimalSeparator
Decimal Separator to be used with BigDecimal numberString
defaultValue
Field's default value in case no value is setString
delimiter
Optional delimiter to be used if the field has a variable lengthString
groupingSeparator
Grouping Separator to be used with BigDecimal number when we would like to format/parse to number with grouping e.g.boolean
impliedDecimalSeparator
Indicates if there is a decimal point implied at a specified locationint
length
Length of the data block (number of characters) if the record is set to a fixed lengthint
lengthPos
Identifies a data field in the record that defines the expected fixed length for this fieldString
method
Method name to call to apply such customization on DataField.String
name
Name of the field (optional)char
paddingChar
The char to pad with if the record is set to a fixed lengthString
pattern
Pattern that the Java formatter (SimpleDateFormat by example) will use to transform the data (optional).int
position
Position of the field in the output message generated (should start from 1).int
precision
precision of theBigDecimal
number to be createdboolean
required
Indicates if the field is mandatoryString
rounding
Round mode to be used to round/scale a BigDecimal Values : UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN,HALF_EVEN, UNNECESSARY e.g : Number = 123456.789, Precision = 2, Rounding = CEILING Result : 123456.79String
timezone
Timezone to be used.boolean
trim
Indicates if the value should be trimmed
-
-
-
-
name
String name
Name of the field (optional)- Default:
- ""
-
-
-
columnName
String columnName
Name of the header column (optional). Uses the name of the property as default. Only applicable when `CsvRecord` has `generateHeaderColumns = true`- Default:
- ""
-
-
-
pattern
String pattern
Pattern that the Java formatter (SimpleDateFormat by example) will use to transform the data (optional). If using pattern, then setting locale on bindy data format is recommended. Either set to a known locale such as "us" or use "default" to use platform default locale.- Default:
- ""
-
-
-
timezone
String timezone
Timezone to be used.- Returns:
- String timezone ID
- Default:
- ""
-
-
-
align
String align
Align the text to the right or left. Use values R or L.- Default:
- "R"
-
-
-
precision
int precision
precision of theBigDecimal
number to be created- Default:
- 0
-
-
-
position
int position
Position of the field in the output message generated (should start from 1). Must be used when the position of the field in the CSV generated (output message) must be different compare to input position (pos). See the pos parameter.- See Also:
pos()
- Default:
- 0
-
-
-
delimiter
String delimiter
Optional delimiter to be used if the field has a variable length- Default:
- ""
-
-
-
defaultValue
String defaultValue
Field's default value in case no value is set- Default:
- ""
-
-
-
decimalSeparator
String decimalSeparator
Decimal Separator to be used with BigDecimal number- Default:
- ""
-
-
-
groupingSeparator
String groupingSeparator
Grouping Separator to be used with BigDecimal number when we would like to format/parse to number with grouping e.g. 123,456.789- Default:
- ""
-
-
-
rounding
String rounding
Round mode to be used to round/scale a BigDecimal Values : UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN,HALF_EVEN, UNNECESSARY e.g : Number = 123456.789, Precision = 2, Rounding = CEILING Result : 123456.79- Default:
- "CEILING"
-
-
-
method
String method
Method name to call to apply such customization on DataField. This must be the method on the datafield itself or you must provide static fully qualified name of the class's method e.g: see unit test org.apache.camel.dataformat.bindy.csv.BindySimpleCsvFunctionWithExternalMethodTest.replaceToBar- Default:
- ""
-
-