Package org.openwms.wms.inventory
Interface ProductService
- All Known Implementing Classes:
ProductServiceImpl
public interface ProductService
A ProductService.
- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescription@NotNull Product
Create a singleProduct
.void
Create a given list ofProducts
.findAll()
Find and return all existingProduct
s.Find an existingProduct
by its synthetic technical key.findByLabelOrSKUOrThrow
(@NotBlank String bk) Find and return anProduct
identified by its given bk.Find and return anProduct
identified by its given sku.findBySKUandUOM
(@NotBlank String sku, @NotBlank String uom) Find and return anProduct
identified by its given sku and uom.findBySKUorThrow
(@NotBlank String sku) Find and return anProduct
identified by its given sku.@NotNull Product
Update an existingProduct
.
-
Method Details
-
create
Create a singleProduct
.- Parameters:
product
- The Product to create
-
createAll
Create a given list ofProducts
.- Parameters:
products
- The list of Products to create
-
findAll
Find and return all existingProduct
s.- Returns:
- As list but never null
-
findBy
Find an existingProduct
by its synthetic technical key.- Parameters:
pKey
- The persistent key- Returns:
- The Product instance
- Throws:
org.ameba.exception.NotFoundException
- if not found
-
findBySKUorThrow
Find and return anProduct
identified by its given sku.- Parameters:
sku
- The product SKU- Returns:
- The product instance
- Throws:
org.ameba.exception.NotFoundException
- In case the Product does not exist
-
findByLabelOrSKUOrThrow
Find and return anProduct
identified by its given bk.- Parameters:
bk
- The product SKU or the label- Returns:
- The product instance
- Throws:
org.ameba.exception.NotFoundException
- In case the Product does not exist
-
findBySKU
Find and return anProduct
identified by its given sku.- Parameters:
sku
- The product SKU- Returns:
- The product instance
-
findBySKUandUOM
Find and return anProduct
identified by its given sku and uom.- Parameters:
sku
- The product SKUuom
- The product UOM- Returns:
- The product instance
-
update
Update an existingProduct
.- Parameters:
entity
- The instance to update- Returns:
- The updated instance
-