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

org.ibankapp.base.persistence.validation.constraint.Unique Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta.6
Show newest version
/*
 * iBankApp
 *
 * License : Apache License,Version 2.0, January 2004
 *
 * See the LICENSE file in English or LICENSE.zh_CN in chinese
 * in the root directory or .
 */

package org.ibankapp.base.persistence.validation.constraint;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * 检查唯一约束的注解.
 *
 * @author ibankapp
 * @author codelder
 * @since 1.0.0
 */
@Documented
@Target({TYPE, ANNOTATION_TYPE})
@Retention(RUNTIME)
@Inherited
public @interface Unique {

  /**
   * 获取 错误信息.
   */
  String message() default "违反唯一约束";

  /**
   * 属性数组.
   */
  String[] properties();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy