Annotation Type ReferenceExists
@Target(FIELD)
@Retention(RUNTIME)
@Constraint(validatedBy=ReferenceValidator.class)
@Documented
public @interface ReferenceExists
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<? extends IdentifiedService> Service class which use for get entity. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]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 messageMessage in case of violation.- Default:
"Reference is not found for field: %s with value: %s"
-
groups
Class<?>[] groupsThe parameter groups, allowing to define under which circumstances this validation is to be triggered.- Default:
{}
-
payload
Class<? extends javax.validation.Payload>[] payloadThe parameter payload, allowing to define a payload to be passed with this validation.- Default:
{}
-
serviceClass
Class<? extends IdentifiedService> serviceClassService class which use for get entity.
-