Annotation Interface ParticipationConstraints


@Documented @Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface ParticipationConstraints
Allows to specify participation constraints of an attribute.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    (Optional) Whether the annotated field can be empty, i.e.
     
  • Element Details

    • value

      Default:
      {}
    • nonEmpty

      boolean nonEmpty
      (Optional) Whether the annotated field can be empty, i.e. null for singular attributes and null or empty for plural attributes (this is up to the implementation).

      This attributes corresponds to using a ParticipationConstraint with min = 1.

      In case there are participation constraints specified as values of this annotation, the nonEmpty value is ignored.

      Returns:
      Whether the field can be empty
      Default:
      false