Interface ObjectNotFoundError

All Superinterfaces:
ErrorObject

public interface ObjectNotFoundError extends ErrorObject

Returned when the requested resource was not found.


Example to create an instance using the builder pattern

     ObjectNotFoundError objectNotFoundError = ObjectNotFoundError.builder()
             .message("{message}")
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "A $resourceType with identifier $id was unexpectedly not found."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • setMessage

      void setMessage(String message)

      "A $resourceType with identifier $id was unexpectedly not found."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • of

      static ObjectNotFoundError of()
      factory method
      Returns:
      instance of ObjectNotFoundError
    • of

      factory method to create a shallow copy ObjectNotFoundError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ObjectNotFoundError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ObjectNotFoundErrorBuilder builder()
      builder factory method for ObjectNotFoundError
      Returns:
      builder
    • builder

      create builder for ObjectNotFoundError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withObjectNotFoundError

      default <T> T withObjectNotFoundError(Function<ObjectNotFoundError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ObjectNotFoundError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference