001package model.validation; 002 003import javax.validation.Constraint; 004import javax.validation.Payload; 005import java.lang.annotation.*; 006 007 008/** 009 * L'identificativo deve corrispondere a un ban esistente 010 * @see BanExistsValidator 011 */ 012@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, 013 ElementType.ANNOTATION_TYPE}) 014@Retention(RetentionPolicy.RUNTIME) 015@Constraint(validatedBy = BanExistsValidator.class) 016@Documented 017public @interface BanExists { 018 String message() default "Ban must exist"; 019 020 Class<?>[] groups() default {}; 021 022 Class<? extends Payload>[] payload() default {}; 023}