001package model.validation;
002
003import javax.validation.Constraint;
004import javax.validation.Payload;
005import java.lang.annotation.*;
006
007/**
008 * Il nome di sezione deve essere univoco
009 * @see UniqueSectionNameValidator
010 */
011@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,
012        ElementType.ANNOTATION_TYPE})
013@Retention(RetentionPolicy.RUNTIME)
014@Constraint(validatedBy = UniqueSectionNameValidator.class)
015@Documented
016public @interface UniqueSection {
017    String message() default "Section already exists";
018
019    Class<?>[] groups() default {};
020
021    Class<? extends Payload>[] payload() default {};
022}