Package tech.xmagic.enums
Enum Class ResultEnum
- All Implemented Interfaces:
Serializable,Comparable<ResultEnum>,Constable,ResultCode
响应结果枚举
- Since:
- 1.0.3
- Version:
- 1.0.3
- Author:
- xmagic
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionApiExceptionDataException 数据错误FailureException 操作失败数据库错误成功SysException 系统错误特殊的系统错误ValidationException -
Field Summary
Fields inherited from interface tech.xmagic.core.ResultCode
SUCCESS -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()返回结果码getMsg()返回提示信息static RCgetRC(int code) 获取响应结果枚举static RC获取响应结果枚举static ResultEnumReturns the enum constant of this class with the specified name.static ResultEnum[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface tech.xmagic.core.ResultCode
isSuccess
-
Enum Constant Details
-
SUCCESS
成功 -
FAILURE
FailureException 操作失败 -
VALIDATION_FAILURE
ValidationException -
DATA_FAILURE
DataException 数据错误 -
DATA_NOT_EXIST
-
DATA_INSERT_FAILURE
-
DATA_UPDATE_FAILURE
-
DATA_DELETE_FAILURE
-
DATA_QUERY_FAILURE
-
DATA_EXCEPTION
-
API_EXCEPTION
ApiException -
API_NATIVE_EXCEPTION
-
API_LOCAL_EXCEPTION
-
API_REMOTE_EXCEPTION
-
API_RPC_EXCEPTION
-
API_HTTP_EXCEPTION
-
API_FEIGN_EXCEPTION
-
API_FOREST_EXCEPTION
-
API_GRPC_EXCEPTION
-
API_DUBBO_EXCEPTION
-
API_TIMEOUT
-
API_NATIVE_TIMEOUT
-
API_LOCAL_TIMEOUT
-
API_REMOTE_TIMEOUT
-
API_RPC_TIMEOUT
-
API_HTTP_TIMEOUT
-
API_FEIGN_TIMEOUT
-
API_FOREST_TIMEOUT
-
API_GRPC_TIMEOUT
-
API_DUBBO_TIMEOUT
-
MQ_EXCEPTION
-
MQ_ROCKETMQ_EXCEPTION
-
MQ_RABBITMQ_EXCEPTION
-
MQ_KAFKA_EXCEPTION
-
MQ_TIMEOUT
-
MQ_ROCKETMQ_TIMEOUT
-
MQ_RABBITMQ_TIMEOUT
-
MQ_KAFKA_TIMEOUT
-
NOTIFY_EXCEPTION
-
NOTIFY_TIMEOUT
-
SYS_EXCEPTION
SysException 系统错误 -
SYS_NOT_SUPPORT
-
SYS_WRAP_EXCEPTION
-
SYS_PARSE_EXCEPTION
-
SYS_ENCRYPT_EXCEPTION
-
SYS_DECRYPT_EXCEPTION
-
SYS_SIGN_EXCEPTION
-
SYS_VERIFY_EXCEPTION
-
SYS_ENCODE_EXCEPTION
-
SYS_DECODE_EXCEPTION
-
SQL_EXCEPTION
数据库错误 -
DATABASE_EXCEPTION
-
UNKNOWN_EXCEPTION
特殊的系统错误 -
RUNTIME_EXCEPTION
-
EXCEPTION
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getCode
public int getCode()Description copied from interface:ResultCode返回结果码- Specified by:
getCodein interfaceResultCode- Returns:
- 结果码
-
getMsg
Description copied from interface:ResultCode返回提示信息- Specified by:
getMsgin interfaceResultCode- Returns:
- 提示信息
-
getRC
获取响应结果枚举- Parameters:
code- 错误码- Returns:
- 响应结果枚举
-
getRC
获取响应结果枚举- Parameters:
name- 错误名- Returns:
- 响应结果枚举
-