org.apache.camel.dataformat.bindy.annotation
Annotation Type DataField


@Documented
@Retention(value=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.


Required Element Summary
 int pos
          Position of the data in the record, must start from 1 (mandatory).
 
Optional Element Summary
 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)
 int length
          Length of the data block if the record is set to a fixed length
 String name
          Name of the field (optional)
 char paddingChar
          The char to pad with if the record is set to a fixed length
 String pattern
          Pattern that the formatter will use to transform the data (optional)
 int position
          Position of the field in the message generated (should start from 1)
 int precision
          precision of the BigDecimal number to be created
 boolean required
          Indicates if the field is mandatory
 boolean trim
          Indicates if the value should be trimmed
 

Element Detail

pos

public abstract int pos
Position of the data in the record, must start from 1 (mandatory).

name

public abstract String name
Name of the field (optional)

Default:
""

columnName

public abstract String columnName
Name of the header column (optional)

Default:
""

pattern

public abstract String pattern
Pattern that the formatter will use to transform the data (optional)

Default:
""

length

public abstract int length
Length of the data block if the record is set to a fixed length

Default:
0

align

public abstract String align
Align the text to the right or left. Use values R or L.

Default:
"R"

paddingChar

public abstract char paddingChar
The char to pad with if the record is set to a fixed length

Default:
32

precision

public abstract int precision
precision of the BigDecimal number to be created

Default:
0

position

public abstract int position
Position of the field in the message generated (should start from 1)

Default:
0

required

public abstract boolean required
Indicates if the field is mandatory

Default:
false

trim

public abstract boolean trim
Indicates if the value should be trimmed

Default:
false

clip

public abstract boolean clip
Indicates to clip data in the field if it exceeds the allowed length when using fixed length.

Default:
false


Apache CAMEL