All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.gov.service.payments.commons.api.validation.MapKeyInsensitiveUnique Maven / Gradle / Ivy

There is a newer version: 1.0.20241216100655
Show newest version
package uk.gov.service.payments.commons.api.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Target({FIELD, PARAMETER, ANNOTATION_TYPE})
@Retention(RUNTIME)
@Constraint(validatedBy = MapKeyInsensitiveUniqueValidator.class)
public @interface MapKeyInsensitiveUnique {

    String message() default "key must be case insensitive unique";

    Class[] groups() default { };

    Class[] payload() default { };

    @Target({ FIELD, PARAMETER})
    @Retention(RUNTIME)
    @interface List {
        MapKeyInsensitiveUnique[] value();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy