Interface CustomObjectReference

All Superinterfaces:
Identifiable<CustomObject>, IdentifiableObjHolder<CustomObject>, Reference, ReferenceMixin

public interface CustomObjectReference extends Reference, Identifiable<CustomObject>, IdentifiableObjHolder<CustomObject>

Reference to a CustomObject.


Example to create an instance using the builder pattern

     CustomObjectReference customObjectReference = CustomObjectReference.builder()
             .id("{id}")
             .build()
 
  • Field Details

    • KEY_VALUE_DOCUMENT

      static final String KEY_VALUE_DOCUMENT
      discriminator value for CustomObjectReference
      See Also:
  • Method Details

    • getObj

      @Valid @Valid CustomObject getObj()

      Contains the representation of the expanded CustomObject. Only present in responses to requests with Reference Expansion for CustomObjects.

      Specified by:
      getObj in interface IdentifiableObjHolder<CustomObject>
      Returns:
      obj
    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the referenced CustomObject.

      Specified by:
      getId in interface Identifiable<CustomObject>
      Specified by:
      getId in interface Reference
      Specified by:
      getId in interface ReferenceMixin
      Returns:
      id
    • setObj

      void setObj(CustomObject obj)

      Contains the representation of the expanded CustomObject. Only present in responses to requests with Reference Expansion for CustomObjects.

      Parameters:
      obj - value to be set
    • setId

      void setId(String id)

      Unique identifier of the referenced CustomObject.

      Specified by:
      setId in interface Reference
      Parameters:
      id - value to be set
    • of

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

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

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

      static CustomObjectReferenceBuilder builder()
      builder factory method for CustomObjectReference
      Returns:
      builder
    • builder

      create builder for CustomObjectReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomObjectReference

      default <T> T withCustomObjectReference(Function<CustomObjectReference,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<CustomObjectReference> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference