Annotation Interface Length


@Target({FIELD,TYPE}) public @interface Length
Specifies the max length (in bytes) that the given column can be. See max() for more information. This annotation is mostly meant for columns of an entity, but can also be specified on a TypeCodec so that all usages inherit this value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    @org.checkerframework.checker.index.qual.Positive int
    The maximum length (in bytes) that the given column can be.
  • Element Details

    • max

      @org.checkerframework.checker.index.qual.Positive int max
      The maximum length (in bytes) that the given column can be. Note that for strings this mean that you have to keep the chosen charset (by default almost always UTF-8) into account. A single UTF-8 character can vary from 1 to 4 bytes per character.
      Default:
      0