net.sf.jsefa.csv.annotation
Annotation Type CsvSubRecord


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface CsvSubRecord

An annotation declaring a CSV sub record.

Author:
Norman Lahme-Huetig

Required Element Summary
 int pos
          The position of the field with the following semantic: If the position of a field A is less than the position of a field B, than field A comes (not necessarily directly) before field B.
 String prefix
          The prefix of the sub record.
 
Optional Element Summary
 String[] constraints
          The constraints to validate.
 String dataTypeName
          The name of the data type of the CSV sub record this annotation describes.
 boolean required
          True, if a value is required; false otherwise.
 Class<? extends Validator> validatorType
          Specifies the validator type to be used.
 

Element Detail

pos

public abstract int pos
The position of the field with the following semantic:

If the position of a field A is less than the position of a field B, than field A comes (not necessarily directly) before field B.
The positions of all fields must specify a total order of the fields.


prefix

public abstract String prefix
The prefix of the sub record. The prefix serves the purpose of identifying the sub record.

dataTypeName

public abstract String dataTypeName
The name of the data type of the CSV sub record this annotation describes. If not set, it must be determinable from the type of the annotated field.

It should be explicitly set if the type mapping should not be created from the annotations given in the class of the annotated field. This is useful when mixing explicit type mapping creation with annotation based type mapping creation.

Default:
""

required

public abstract boolean required
True, if a value is required; false otherwise.

Default:
false

validatorType

public abstract Class<? extends Validator> validatorType
Specifies the validator type to be used. In the default case the validator type is determined using the type of the java field with this annotation.

Default:
net.sf.jsefa.common.annotation.NoValidatorType.class

constraints

public abstract String[] constraints
The constraints to validate. Each constraint is a String of the form 'name=value' where name is the name of the constraint and value is its value. The allowed set of constraints depend on the validator type.

Default:
{}


Copyright © 2014. All rights reserved.