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

io.github.xtazxz.base.common.ec.define.ErrorCodeDatabase Maven / Gradle / Ivy

The newest version!
package io.github.xtazxz.base.common.ec.define;


import io.github.xtazxz.base.common.ec.ErrorCodeBase;
import io.github.xtazxz.base.entity.ErrorCode;

public class ErrorCodeDatabase {

  /**
   * 违反数据库约束
   */
  public static ErrorCode violationConstraint(String messagePattern, Object... argArray) {
    return ErrorCode.business(ErrorCodeBase.EC_BASE_DATABASE + 1, messagePattern, argArray);
  }

  public static ErrorCode recordAlreadyExists() {
    return ErrorCode.business(ErrorCodeBase.EC_BASE_DATABASE + 2, "记录已存在");
  }

  public static ErrorCode recordNotExists() {
    return ErrorCode.business(ErrorCodeBase.EC_BASE_DATABASE + 3, "记录不存在");
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy