Annotation Interface Unique


@Retention(RUNTIME) @Target({FIELD,PARAMETER}) @Constraint(checkWith=UniqueCheck.class) public @interface Unique
Check that a field or or field in a context is unique. You set the context as a list (comma, semicolon or space separated) of properties of your GenericModel.

Message key: validation.unique $1: field name $2: properties which define a context in which the column must be unique

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
     
  • Element Details

    • value

      String value
      Default:
      ""
    • message

      String message
      Default:
      "validation.unique"