Annotation Interface ConstraintWeight


@Deprecated(forRemoval=true, since="1.13.0") @Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface ConstraintWeight
Deprecated, for removal: This API element is subject to removal in a future version.
Specifies that a bean property (or a field) set the constraint weight and score level of a constraint. For example, with a constraint weight of 2soft, a constraint match penalization with weightMultiplier 3 will result in a Score of -6soft.

It is specified on a getter of a java bean property (or directly on a field) of a ConstraintConfiguration class.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    The constraint name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    The constraint package is the namespace of the constraint.
  • Element Details

    • value

      String value
      Deprecated, for removal: This API element is subject to removal in a future version.
      The constraint name.

      The constraint id is the constraint package concatenated with "/" and this constraint name.

      Returns:
      never null, often a constant that is used by the constraints too, because they need to match.
    • constraintPackage

      String constraintPackage
      Deprecated, for removal: This API element is subject to removal in a future version.
      The constraint package is the namespace of the constraint.

      The constraint id is this constraint package concatenated with "/" and the constraint name.

      Returns:
      defaults to ConstraintConfiguration.constraintPackage()
      Default:
      ""