Annotation Type Field



  • @Retention(RUNTIME)
    @Target({METHOD,PARAMETER})
    public @interface Field
    Defines database record field. Must be applied to getters. If Record uses RecordBuilder annotated constructor its parameters must be annotated by Field as well.
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String ID
      Most used value for the primary key field.
      static int LENGTH
      Default field length.
      static int PRECISION
      Default precision of BigDecimal field.
      static int SCALE
      Default scale of BigDecimal field.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value
      SQL name of the field.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int length
      Defines length of the field.
      boolean nullable
      Defines if the field can be NULL.
      int precision
      Defines PRECISION.
      boolean primaryKey
      Defines if the field is a primary key.
      int scale
      Defines SCALE.
    • Field Detail

      • ID

        static final java.lang.String ID
        Most used value for the primary key field.
      • LENGTH

        static final int LENGTH
        Default field length.
      • SCALE

        static final int SCALE
        Default scale of BigDecimal field.
      • PRECISION

        static final int PRECISION
        Default precision of BigDecimal field.
    • Element Detail

      • value

        java.lang.String value
        SQL name of the field.
        Returns:
        name of the field
      • nullable

        boolean nullable
        Defines if the field can be NULL.
        Returns:
        true if the field can take NULL values
        Default:
        true
      • primaryKey

        boolean primaryKey
        Defines if the field is a primary key.
        Returns:
        true if the field is a primary key
        Default:
        false
      • length

        int length
        Defines length of the field.
        Returns:
        length of the field
        Default:
        255
      • precision

        int precision
        Defines PRECISION. Applicable to numeric data types.
        Returns:
        PRECISION
        Default:
        15
      • scale

        int scale
        Defines SCALE. Applicable to numeric data types.
        Returns:
        SCALE
        Default:
        6