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

org.openl.rules.ui.validation.TableNameConstraint Maven / Gradle / Ivy

There is a newer version: 5.27.9
Show newest version
package org.openl.rules.ui.validation;

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

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

/**
 * The annotated {@code CharSequence} must be a valid Java identifier
 * https://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8
 */
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {TableNameValidator.class})
public @interface TableNameConstraint {

    /**
     * @return the error message
     */
    String message() default "{webstudio.invalid.name}";

    /**
     * @return the groups the constraint belongs to
     */
    Class[] groups() default {};

    /**
     * @return the payload associated to the constraint
     */
    Class[] payload() default {};

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy