public enum FieldType extends Enum<FieldType>
Type of a LayoutField
. The following table shows the defined types
and their property restrictions:
Description | Type | Length or Occurrences | Numeric Scale | Default Value |
---|---|---|---|---|
Alpha numeric string | ALPHA |
Must be greater than 0 | Must be 0 | Empty string |
Date | DATE |
Either 4, 6 or 8 | Must be 0 | 01-01-0001 |
List array | LIST |
Must be greater than 0 | Must be 0 | Empty string |
End of list array | LISTEND |
N/A (set to 0) | N/A (set to 0) | N/A (set to null) |
Unsigned decimal | NUMERIC |
Must be greater than 0 | Greater or equal to 0 | 0 |
Chilean RUT | RUT |
Must be greater than 1 | Must be 1 | 0-0 |
Signed decimal | SIGNED |
Must be greater than 0 | Greater or equal to 0 | 0 |
Text string | TEXT |
Must be greater than 0 | Must be 0 | Empty string |
A LayoutField
of type LIST
represents a list
of fields with multiple occurrences (an array). The number of occurrences of
the fields contained in the list is given by the length of the LIST
. Each field in this list is accessed using it's name
and an index
number where (0 <= index < occurrences)
.
The LISTEND
type is used to complete (or terminate)
the definition of a LayoutField
of type LIST
;
it does not represent an actual field.
Enum Constant and Description |
---|
ALPHA
Alphanumeric layout field (A).
|
CHECKSUM
Checksum pseudo layout field (CS).
|
DATE
Date layout field (D).
|
LIST
List layout field (LB).
|
LISTEND
End-of-list pseudo layout field (LE).
|
NUMERIC
Unsigned number layout field (N).
|
RUT
RUT layout field (R).
|
SIGNED
Signed number layout field (S).
|
TEXT
Text layout field (X).
|
VERSION
Version pseudo layout field (VR).
|
Modifier and Type | Method and Description |
---|---|
static FieldType |
fromAlias(String alias)
Returns the
FieldType with the supplied alias . |
String |
getAlias()
Returns the alias of this
FieldType . |
static FieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FieldType ALPHA
public static final FieldType DATE
public static final FieldType LIST
public static final FieldType LISTEND
public static final FieldType NUMERIC
public static final FieldType RUT
public static final FieldType SIGNED
public static final FieldType TEXT
public static final FieldType VERSION
public static final FieldType CHECKSUM
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getAlias()
FieldType
.FieldType
.public static FieldType fromAlias(String alias)
FieldType
with the supplied alias
.alias
- the alias of the required FieldType
.FieldType
with supplied alias
.NullPointerException
- if alias
is null
.IllegalArgumentException
- if alias
is unknown.Copyright © OBCOM INGENIERIA S.A. (Chile). All Rights Reserved.