类 CodeResult<T>

java.lang.Object
org.springframework.http.HttpEntity<T>
org.springframework.http.ResponseEntity<T>
cloud.opencode.base.basecode.CodeResult<T>
所有已实现的接口:
Serializable

public class CodeResult<T> extends org.springframework.http.ResponseEntity<T> implements Serializable
作者:
Jon url: Jon's blog url: OpenCode.cloud
另请参阅:
  • 嵌套类概要

    从类继承的嵌套类/接口 org.springframework.http.ResponseEntity

    org.springframework.http.ResponseEntity.BodyBuilder, org.springframework.http.ResponseEntity.HeadersBuilder<B extends org.springframework.http.ResponseEntity.HeadersBuilder<B>>
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private Integer
     
    private T
     
    private String
     
    private Long
     
    private Long
     
    private static final long
     
    private Long
     

    从类继承的字段 org.springframework.http.HttpEntity

    EMPTY
  • 构造器概要

    构造器
    构造器
    说明
    CodeResult(org.springframework.http.HttpStatusCode status)
     
    CodeResult(org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode status)
     
    CodeResult(T body, org.springframework.http.HttpStatusCode status)
     
    CodeResult(T body, org.springframework.http.HttpStatusCode status, Integer code)
     
    CodeResult(T body, org.springframework.http.HttpStatusCode status, String message)
     
    CodeResult(T body, org.springframework.http.HttpStatusCode status, String message, Integer code)
     
    CodeResult(T body, org.springframework.http.HttpStatusCode status, String message, Long total, Long page, Long pageSize)
     
    CodeResult(T body, org.springframework.http.HttpStatusCode status, String message, Long total, Long page, Long pageSize, Integer code)
     
    CodeResult(T body, org.springframework.util.MultiValueMap<String,String> headers, int rawStatus)
     
    CodeResult(T body, org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode statusCode)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static CodeResult
    ERROR(String message)
    ERROR
    static CodeResult
    ERROR(String message, org.springframework.http.HttpStatus status)
    ERROR
    static CodeResult
    OK()
    OK
    static CodeResult
    OK(String message, Integer code)
    OK
    static CodeResult
    OK(org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode status)
    OK
    static <T> CodeResult
    OK(T data)
    OK
    static <T> CodeResult
    OK(T data, String message)
    OK
    static <T> CodeResult
    OK(T data, String message, Integer code)
    OK
    static <T> CodeResult
    OK(T data, String message, Long total, Long page, Long pageSize)
    OK
    static <T> CodeResult
    OK(T data, String message, Long total, Long page, Long pageSize, Integer code)
    OK
    static <T> CodeResult
    OK(T body, org.springframework.util.MultiValueMap<String,String> headers, int rawStatus)
    OK
    static <T> CodeResult
    OK(T body, org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode statusCode)
    OK

    从类继承的方法 org.springframework.http.ResponseEntity

    accepted, badRequest, created, equals, getStatusCode, getStatusCodeValue, hashCode, internalServerError, noContent, notFound, of, of, ofNullable, ok, ok, status, status, toString, unprocessableEntity

    从类继承的方法 org.springframework.http.HttpEntity

    getBody, getHeaders, hasBody

    从类继承的方法 java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • data

      private T data
    • code

      private Integer code
    • message

      private String message
    • total

      private Long total
    • page

      private Long page
    • pageSize

      private Long pageSize
  • 构造器详细资料

    • CodeResult

      public CodeResult(org.springframework.http.HttpStatusCode status)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.http.HttpStatusCode status)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.http.HttpStatusCode status, @Nullable Integer code)
    • CodeResult

      public CodeResult(@Nullable org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode status)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.util.MultiValueMap<String,String> headers, int rawStatus)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode statusCode)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.http.HttpStatusCode status, @Nullable String message)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.http.HttpStatusCode status, @Nullable String message, @Nullable Integer code)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.http.HttpStatusCode status, @Nullable String message, @Nullable Long total, @Nullable Long page, @Nullable Long pageSize)
    • CodeResult

      public CodeResult(@Nullable T body, org.springframework.http.HttpStatusCode status, @Nullable String message, @Nullable Long total, @Nullable Long page, @Nullable Long pageSize, @Nullable Integer code)
  • 方法详细资料

    • OK

      public static CodeResult OK()
      OK
      返回:
    • OK

      public static <T> CodeResult OK(T data)
      OK
      类型参数:
      T -
      参数:
      data -
      返回:
    • OK

      public static <T> CodeResult OK(T data, String message)
      OK
      类型参数:
      T -
      参数:
      data -
      message -
      返回:
    • OK

      public static <T> CodeResult OK(T data, String message, Integer code)
      OK
      类型参数:
      T -
      参数:
      data -
      message -
      code -
      返回:
    • OK

      public static <T> CodeResult OK(T data, String message, Long total, Long page, Long pageSize)
      OK
      类型参数:
      T -
      参数:
      data -
      message -
      total -
      page -
      pageSize -
      返回:
    • OK

      public static <T> CodeResult OK(T data, String message, Long total, Long page, Long pageSize, Integer code)
      OK
      类型参数:
      T -
      参数:
      data -
      message -
      total -
      page -
      pageSize -
      code -
      返回:
    • OK

      public static CodeResult OK(String message, Integer code)
      OK
      参数:
      message -
      code -
      返回:
    • OK

      public static <T> CodeResult OK(@Nullable T body, org.springframework.util.MultiValueMap<String,String> headers, int rawStatus)
      OK
      类型参数:
      T -
      参数:
      body -
      headers -
      rawStatus -
      返回:
    • OK

      public static CodeResult OK(@Nullable org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode status)
      OK
      参数:
      headers -
      status -
      返回:
    • OK

      public static <T> CodeResult OK(@Nullable T body, org.springframework.util.MultiValueMap<String,String> headers, org.springframework.http.HttpStatusCode statusCode)
      OK
      类型参数:
      T -
      参数:
      body -
      headers -
      statusCode -
      返回:
    • ERROR

      public static CodeResult ERROR(String message, org.springframework.http.HttpStatus status)
      ERROR
      参数:
      message -
      status -
      返回:
    • ERROR

      public static CodeResult ERROR(String message)
      ERROR
      参数:
      message -
      返回: