Interface TypeUpdate

All Superinterfaces:
ResourceUpdate<TypeUpdate,TypeUpdateAction,TypeUpdateBuilder>

public interface TypeUpdate extends ResourceUpdate<TypeUpdate,TypeUpdateAction,TypeUpdateBuilder>
TypeUpdate
Example to create an instance using the builder pattern

     TypeUpdate typeUpdate = TypeUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()

      Expected version of the type 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<TypeUpdate,TypeUpdateAction,TypeUpdateBuilder>
      Returns:
      version
    • getActions

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

      Update actions to be performed on the Type.

      Specified by:
      getActions in interface ResourceUpdate<TypeUpdate,TypeUpdateAction,TypeUpdateBuilder>
      Returns:
      actions
    • setVersion

      void setVersion(Long version)

      Expected version of the type 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<TypeUpdate,TypeUpdateAction,TypeUpdateBuilder>
      Parameters:
      version - value to be set
    • setActions

      void setActions(TypeUpdateAction... actions)

      Update actions to be performed on the Type.

      Parameters:
      actions - values to be set
    • setActions

      void setActions(List<TypeUpdateAction> actions)

      Update actions to be performed on the Type.

      Specified by:
      setActions in interface ResourceUpdate<TypeUpdate,TypeUpdateAction,TypeUpdateBuilder>
      Parameters:
      actions - values to be set
    • of

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

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

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

      static TypeUpdateBuilder builder()
      builder factory method for TypeUpdate
      Returns:
      builder
    • builder

      static TypeUpdateBuilder builder(TypeUpdate template)
      create builder for TypeUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTypeUpdate

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