Enum Class ResultCode

java.lang.Object
java.lang.Enum<ResultCode>
pub.ihub.cloud.rest.ResultCode
All Implemented Interfaces:
Serializable, Comparable<ResultCode>, Constable, IResultCode

public enum ResultCode extends Enum<ResultCode> implements IResultCode
标准响应编码
  • Enum Constant Details

    • SUCCESS

      public static final ResultCode SUCCESS
    • DATA_VALIDATION_ERROR

      public static final ResultCode DATA_VALIDATION_ERROR
    • CONSTRAINT_VIOLATION_ERROR

      public static final ResultCode CONSTRAINT_VIOLATION_ERROR
    • AUTHENTICATION_ERROR

      public static final ResultCode AUTHENTICATION_ERROR
    • AUTHORIZATION_ERROR

      public static final ResultCode AUTHORIZATION_ERROR
    • CLIENT_ERROR

      public static final ResultCode CLIENT_ERROR
    • NOT_FOUND_ERROR

      public static final ResultCode NOT_FOUND_ERROR
    • INVALID_FORMAT_ERROR

      public static final ResultCode INVALID_FORMAT_ERROR
    • SERVER_ERROR

      public static final ResultCode SERVER_ERROR
    • BUSINESS_ERROR

      public static final ResultCode BUSINESS_ERROR
  • Method Details

    • values

      public static ResultCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ResultCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
      响应编码
      Specified by:
      getCode in interface IResultCode
      Returns:
      编码
    • getMessage

      public String getMessage()
      响应信息
      Specified by:
      getMessage in interface IResultCode
      Returns:
      信息