Annotation Type StringLength


@Retention(RUNTIME) @Target(METHOD) public @interface StringLength

Explicitly specifies the maximum length, in characters, of the underlying database column corresponding to the method in question. This is valid for accessors of type String, and is ignored for all other types. The value can be a positive integer or UNLIMITED; an unlimited-length string is stored as the corresponding "long string" database type (TEXT, CLOB, etc. depending on the database provider).

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Specifies the maximum length of the database column in characters.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Field Details

  • Element Details

    • value

      int value
      Specifies the maximum length of the database column in characters. This can be a positive integer or UNLIMITED.