Interface StateReference

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

public interface StateReference extends Reference, Identifiable<State>, IdentifiableObjHolder<State>

Reference to a State.


Example to create an instance using the builder pattern

     StateReference stateReference = StateReference.builder()
             .id("{id}")
             .build()
 
  • Field Details

  • Method Details

    • getObj

      @Valid @Valid State getObj()

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

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

      @NotNull @NotNull String getId()

      Unique identifier of the referenced State.

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

      void setObj(State obj)

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

      Parameters:
      obj - value to be set
    • setId

      void setId(String id)

      Unique identifier of the referenced State.

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

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

      static StateReference of(StateReference template)
      factory method to create a shallow copy StateReference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static StateReference deepCopy(@Nullable StateReference template)
      factory method to create a deep copy of StateReference
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static StateReferenceBuilder builder()
      builder factory method for StateReference
      Returns:
      builder
    • builder

      static StateReferenceBuilder builder(StateReference template)
      create builder for StateReference instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStateReference

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