Class ODataError

java.lang.Object
org.apache.olingo.commons.api.ex.ODataError
Direct Known Subclasses:
ODataServerError

public class ODataError extends Object
OData error.
  • Constructor Details

    • ODataError

      public ODataError()
  • Method Details

    • getCode

      public String getCode()
      The value for the code name/value pair is a language-independent string. Its value is a service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
      Returns:
      the error code as a string
    • setCode

      public ODataError setCode(String code)
      The value for the code name/value pair is a language-independent string. Its value is a service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
      Parameters:
      code - the service defined error code for this error
      Returns:
      this for method chaining
    • getMessage

      public String getMessage()
      The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error. MUST not be null
      Returns:
      the message string
    • setMessage

      public ODataError setMessage(String message)
      The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error. MUST not be null
      Parameters:
      message - message for this error
      Returns:
      this for method chaining
    • getTarget

      public String getTarget()
      The value for the target name/value pair is the target of the particular error (for example, the name of the property in error). MAY be null.
      Returns:
      the target string
    • setTarget

      public ODataError setTarget(String target)
      The value for the target name/value pair is the target of the particular error (for example, the name of the property in error). MAY be null.
      Parameters:
      target - target to which this error is related to
      Returns:
      this for method chaining
    • getDetails

      public List<ODataErrorDetail> getDetails()
      Gets error details.
      Returns:
      ODataErrorDetail list.
    • setDetails

      public ODataError setDetails(List<ODataErrorDetail> details)
      Sets error details.
      Returns:
      this for method chaining.
    • getInnerError

      public Map<String,String> getInnerError()
      Gets server defined key-value pairs for debug environment only.
      Returns:
      a pair representing server defined object. MAY be null.
    • setInnerError

      public ODataError setInnerError(Map<String,String> innerError)
      Sets server defined key-value pairs for debug environment only.
      Returns:
      this for method chaining.
    • setAdditionalProperties

      public ODataError setAdditionalProperties(Map<String,Object> additionalProperties)
      Sets server defined additional properties
      Parameters:
      additionalProperties -
      Returns:
      this for method chaining.
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Gets server defined additional properties.
      Returns:
      a pair representing server defined object.