Interface InventoryQuantityValue
public interface InventoryQuantityValue
InventoryQuantityValue
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
InventoryQuantityValue inventoryQuantityValue = InventoryQuantityValue.builder()
.quantityOnStock(1)
.availableQuantity(1)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for InventoryQuantityValuebuilder(InventoryQuantityValue template) create builder for InventoryQuantityValue instancecopyDeep()static InventoryQuantityValuedeepCopy(InventoryQuantityValue template) factory method to create a deep copy of InventoryQuantityValue@NotNull IntegerAvailable amount of stock (quantityOnStock- reserved).@NotNull IntegerOverall amount of stock (availableQuantity+ reserved).static InventoryQuantityValueof()factory methodstatic InventoryQuantityValueof(InventoryQuantityValue template) factory method to create a shallow copy InventoryQuantityValuevoidsetAvailableQuantity(Integer availableQuantity) Available amount of stock (quantityOnStock- reserved).voidsetQuantityOnStock(Integer quantityOnStock) Overall amount of stock (availableQuantity+ reserved).static com.fasterxml.jackson.core.type.TypeReference<InventoryQuantityValue>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map function
-
Method Details
-
getQuantityOnStock
Overall amount of stock (
availableQuantity+ reserved).- Returns:
- quantityOnStock
-
getAvailableQuantity
Available amount of stock (
quantityOnStock- reserved).- Returns:
- availableQuantity
-
setQuantityOnStock
Overall amount of stock (
availableQuantity+ reserved).- Parameters:
quantityOnStock- value to be set
-
setAvailableQuantity
Available amount of stock (
quantityOnStock- reserved).- Parameters:
availableQuantity- value to be set
-
of
factory method- Returns:
- instance of InventoryQuantityValue
-
of
factory method to create a shallow copy InventoryQuantityValue- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InventoryQuantityValue copyDeep() -
deepCopy
factory method to create a deep copy of InventoryQuantityValue- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryQuantityValue- Returns:
- builder
-
builder
create builder for InventoryQuantityValue instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryQuantityValue
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-