Enum Class FieldType

java.lang.Object
java.lang.Enum<FieldType>
cl.obcom.desktopfx.layout.FieldType
All Implemented Interfaces:
Serializable, Comparable<FieldType>, Constable

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 Details

    • ALPHA

      public static final FieldType ALPHA
      Alphanumeric layout field (A).
    • DATE

      public static final FieldType DATE
      Date layout field (D).
    • LIST

      public static final FieldType LIST
      List layout field (LB).
    • LISTEND

      public static final FieldType LISTEND
      End-of-list pseudo layout field (LE).
    • NUMERIC

      public static final FieldType NUMERIC
      Unsigned number layout field (N).
    • RUT

      public static final FieldType RUT
      RUT layout field (R).
    • SIGNED

      public static final FieldType SIGNED
      Signed number layout field (S).
    • TEXT

      public static final FieldType TEXT
      Text layout field (X).
    • VERSION

      public static final FieldType VERSION
      Version pseudo layout field (VR).
    • CHECKSUM

      public static final FieldType CHECKSUM
      Checksum pseudo layout field (CS).
  • Method Details

    • values

      public static FieldType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FieldType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAlias

      public String getAlias()
      Returns the alias of this FieldType.
      Returns:
      the alias of this FieldType.
    • fromAlias

      public static FieldType fromAlias(String alias)
      Returns the FieldType with the supplied alias.
      Parameters:
      alias - the alias of the required FieldType.
      Returns:
      the FieldType with supplied alias.
      Throws:
      NullPointerException - if alias is null.
      IllegalArgumentException - if alias is unknown.