Annotation Interface ReferenceExists
@Target(FIELD)
@Retention(RUNTIME)
@Constraint(validatedBy=ReferenceExistsValidator.class)
public @interface ReferenceExists
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionPoints to a property key in ValidationMessages.properties, which is used to resolve a message in case of violation.Class<? extends IdentifiedService> Specifies the service bean which will be used to verify that object with given ID is exists. -
Optional Element Summary
Optional Elements
-
Element Details
-
service
Class<? extends IdentifiedService> serviceSpecifies the service bean which will be used to verify that object with given ID is exists. -
message
String messagePoints to a property key in ValidationMessages.properties, which is used to resolve a message in case of violation. -
groups
Class<?>[] groupsAllows to define under which circumstances this validation is to be triggered.- Default:
{}
-
payload
Class<? extends javax.validation.Payload>[] payloadAllows to define a payload to be passed with this validation.- Default:
{}
-