Interface StateUpdate

All Superinterfaces:
ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>

public interface StateUpdate extends ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>
StateUpdate
Example to create an instance using the builder pattern

     StateUpdate stateUpdate = StateUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()

      Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Specified by:
      getVersion in interface ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>
      Returns:
      version
    • getActions

      @NotNull @Valid @NotNull @Valid List<StateUpdateAction> getActions()

      Update actions to be performed on the State.

      Specified by:
      getActions in interface ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>
      Returns:
      actions
    • setVersion

      void setVersion(Long version)

      Expected version of the State on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Specified by:
      setVersion in interface ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>
      Parameters:
      version - value to be set
    • setActions

      void setActions(StateUpdateAction... actions)

      Update actions to be performed on the State.

      Parameters:
      actions - values to be set
    • setActions

      void setActions(List<StateUpdateAction> actions)

      Update actions to be performed on the State.

      Specified by:
      setActions in interface ResourceUpdate<StateUpdate,StateUpdateAction,StateUpdateBuilder>
      Parameters:
      actions - values to be set
    • of

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

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

      StateUpdate copyDeep()
    • deepCopy

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

      static StateUpdateBuilder builder()
      builder factory method for StateUpdate
      Returns:
      builder
    • builder

      static StateUpdateBuilder builder(StateUpdate template)
      create builder for StateUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStateUpdate

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