Interface StoreUpdate

All Superinterfaces:
ResourceUpdate<StoreUpdate,StoreUpdateAction,StoreUpdateBuilder>

public interface StoreUpdate extends ResourceUpdate<StoreUpdate,StoreUpdateAction,StoreUpdateBuilder>
StoreUpdate
Example to create an instance using the builder pattern

     StoreUpdate storeUpdate = StoreUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()

      Expected version of the Store 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<StoreUpdate,StoreUpdateAction,StoreUpdateBuilder>
      Returns:
      version
    • getActions

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

      Update actions to be performed on the Store.

      Specified by:
      getActions in interface ResourceUpdate<StoreUpdate,StoreUpdateAction,StoreUpdateBuilder>
      Returns:
      actions
    • setVersion

      void setVersion(Long version)

      Expected version of the Store 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<StoreUpdate,StoreUpdateAction,StoreUpdateBuilder>
      Parameters:
      version - value to be set
    • setActions

      void setActions(StoreUpdateAction... actions)

      Update actions to be performed on the Store.

      Parameters:
      actions - values to be set
    • setActions

      void setActions(List<StoreUpdateAction> actions)

      Update actions to be performed on the Store.

      Specified by:
      setActions in interface ResourceUpdate<StoreUpdate,StoreUpdateAction,StoreUpdateBuilder>
      Parameters:
      actions - values to be set
    • of

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

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

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

      static StoreUpdateBuilder builder()
      builder factory method for StoreUpdate
      Returns:
      builder
    • builder

      static StoreUpdateBuilder builder(StoreUpdate template)
      create builder for StoreUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStoreUpdate

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