Annotation Type ReferenceExists


@Target(FIELD) @Retention(RUNTIME) @Constraint(validatedBy=ReferenceValidator.class) @Documented public @interface ReferenceExists
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Service class which use for get entity.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    The parameter groups, allowing to define under which circumstances this validation is to be triggered.
    Message in case of violation.
    Class<? extends javax.validation.Payload>[]
    The parameter payload, allowing to define a payload to be passed with this validation.
  • Element Details

    • message

      String message
      Message in case of violation.
      Default:
      "Reference is not found for field: %s with value: %s"
    • groups

      Class<?>[] groups
      The parameter groups, allowing to define under which circumstances this validation is to be triggered.
      Default:
      {}
    • payload

      Class<? extends javax.validation.Payload>[] payload
      The parameter payload, allowing to define a payload to be passed with this validation.
      Default:
      {}
    • serviceClass

      Class<? extends IdentifiedService> serviceClass
      Service class which use for get entity.