Interface Update

All Superinterfaces:
ResourceUpdate<Update,UpdateAction,UpdateBuilder>

public interface Update extends ResourceUpdate<Update,UpdateAction,UpdateBuilder>
Update
Example to create an instance using the builder pattern

     Update update = Update.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()
      Specified by:
      getVersion in interface ResourceUpdate<Update,UpdateAction,UpdateBuilder>
      Returns:
      version
    • getActions

      @NotNull @Valid @NotNull @Valid List<UpdateAction> getActions()
      Specified by:
      getActions in interface ResourceUpdate<Update,UpdateAction,UpdateBuilder>
      Returns:
      actions
    • setVersion

      void setVersion(Long version)
      set version
      Specified by:
      setVersion in interface ResourceUpdate<Update,UpdateAction,UpdateBuilder>
      Parameters:
      version - value to be set
    • setActions

      void setActions(UpdateAction... actions)
      set actions
      Parameters:
      actions - values to be set
    • setActions

      void setActions(List<UpdateAction> actions)
      set actions
      Specified by:
      setActions in interface ResourceUpdate<Update,UpdateAction,UpdateBuilder>
      Parameters:
      actions - values to be set
    • of

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

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

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

      static UpdateBuilder builder()
      builder factory method for Update
      Returns:
      builder
    • builder

      static UpdateBuilder builder(Update template)
      create builder for Update instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withUpdate

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