Annotation Type 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
      java.lang.String message  
      java.lang.String value  
    • Element Detail

      • value

        java.lang.String value
        Default:
        ""
      • message

        java.lang.String message
        Default:
        "validation.unique"