Package com.rubensgomes.reqresp
Class BaseResponse
java.lang.Object
com.rubensgomes.reqresp.BaseResponse
Base Response Object
A base type to be part of microservice responses.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic enumThe status of the response. -
Constructor Summary
ConstructorsConstructorDescriptionNo args constructor for use in serializationBaseResponse(String clientId, String transactionId, BaseResponse.ResponseStatus responseStatus, String errorMessage, String errorRootCause) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanThe client who made the initial originating request.The error messageThe root cause error messageThe status of the response.Unique text used to correlate requests and responses.inthashCode()voidsetAdditionalProperty(String name, Object value) voidsetClientId(String clientId) The client who made the initial originating request.voidsetErrorMessage(String errorMessage) The error messagevoidsetErrorRootCause(String errorRootCause) The root cause error messagevoidsetResponseStatus(BaseResponse.ResponseStatus responseStatus) The status of the response.voidsetTransactionId(String transactionId) Unique text used to correlate requests and responses.toString()
-
Constructor Details
-
BaseResponse
public BaseResponse()No args constructor for use in serialization -
BaseResponse
public BaseResponse(String clientId, String transactionId, BaseResponse.ResponseStatus responseStatus, String errorMessage, String errorRootCause) - Parameters:
clientId- The client who made the initial originating request.errorMessage- The error message.errorRootCause- The root cause error message.responseStatus- The status of the response.transactionId- Unique text used to correlate requests and responses.
-
-
Method Details
-
builder
-
getClientId
The client who made the initial originating request. (Required) -
setClientId
The client who made the initial originating request. (Required) -
getTransactionId
Unique text used to correlate requests and responses. (Required) -
setTransactionId
Unique text used to correlate requests and responses. (Required) -
getResponseStatus
The status of the response. (Required) -
setResponseStatus
The status of the response. (Required) -
getErrorMessage
The error message -
setErrorMessage
The error message -
getErrorRootCause
The root cause error message -
setErrorRootCause
The root cause error message -
getAdditionalProperties
-
setAdditionalProperty
-
toString
-
hashCode
public int hashCode() -
equals
-