net.sf.jsefa.flr.annotation
Annotation Type FlrField


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

FLR field annotation.

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.
 
Optional Element Summary
 Align align
          The alignment of values which length is less than the required fixed length.
 String[] constraints
          The constraints to validate.
 Class<? extends SimpleTypeConverter> converterType
          Specifies the converter type to be used.
 boolean crop
          Relevant for the serializing operation.
 String dataTypeName
          The name of the data type of the FLR field this annotation describes.
 String[] format
          The format to be used to construct a SimpleTypeConverter for this field.
 int length
          The length of the field in characters.
 SimpleListItem listItem
          In case of a simple type list this annotation parameter provides details about the list items.
 char padCharacter
          The pad character used to fill empty space.
 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.

dataTypeName

public abstract String dataTypeName
The name of the data type of the FLR field this annotation describes. If not set, it must be determinable from the type of the annotated java 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:
""

format

public abstract String[] format
The format to be used to construct a SimpleTypeConverter for this field. The SimpleTypeConverter class will be determined using the type of the annotated java field.

Default:
{}

length

public abstract int length
The length of the field in characters. If not specified the field type must be complex.

Default:
-1

crop

public abstract boolean crop
Relevant for the serializing operation. If set to true an overlong field value will be cropped to the specified length (column width). Default behavior until JSefa version 0.9.4. If set to false a SerializationException is thrown in case of an overlong value length (default behavior now).

Remind that configuring this setting to true generally may suit to string fields but is less favorable for Date and other data types. By setting to true you may loose information while serializing.

Default:
false

padCharacter

public abstract char padCharacter
The pad character used to fill empty space.

Default:
1

align

public abstract Align align
The alignment of values which length is less than the required fixed length.

Default:
net.sf.jsefa.flr.lowlevel.Align.LEFT

converterType

public abstract Class<? extends SimpleTypeConverter> converterType
Specifies the converter type to be used. In the default case the converter type is determined using the type of the annotated java field.

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

listItem

public abstract SimpleListItem listItem
In case of a simple type list this annotation parameter provides details about the list items.

Default:
@net.sf.jsefa.common.annotation.SimpleListItem

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.