Interface ItemState


public interface ItemState
ItemState
Example to create an instance using the builder pattern

     ItemState itemState = ItemState.builder()
             .quantity(0.3)
             .state(stateBuilder -> stateBuilder)
             .build()
 
  • Method Details

    • getQuantity

      @NotNull @NotNull Long getQuantity()

      Number of Line Items or Custom Line Items in this State.

      Returns:
      quantity
    • getState

      @NotNull @Valid @NotNull @Valid StateReference getState()

      State of the Line Items or Custom Line Items in a custom workflow.

      Returns:
      state
    • setQuantity

      void setQuantity(Long quantity)

      Number of Line Items or Custom Line Items in this State.

      Parameters:
      quantity - value to be set
    • setState

      void setState(StateReference state)

      State of the Line Items or Custom Line Items in a custom workflow.

      Parameters:
      state - value to be set
    • of

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

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

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

      static ItemStateBuilder builder()
      builder factory method for ItemState
      Returns:
      builder
    • builder

      static ItemStateBuilder builder(ItemState template)
      create builder for ItemState instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withItemState

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