Interface SourcingResultFactory
- All Known Implementing Classes:
DefaultSourcingResultFactory
public interface SourcingResultFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreate(AbstractOrderEntryModel orderEntry, SourcingLocation sourcingLocation, Long quantity) Create a sourcing result.create(Collection<AbstractOrderEntryModel> orderEntries, SourcingLocation sourcingLocation) Create a sourcing result where all order entries are sourced from the given sourcingLocation and using the quantity specified byAbstractOrderEntryModel#getQuantityUnallocated().create(Collection<SourcingResults> results) Create a single sourcing result from a collection of sourcing results.create(Map<AbstractOrderEntryModel, Long> allocation, SourcingLocation sourcingLocation) Create a sourcing result where all order entries are sourced from the given sourcingLocation and using the quantity specified in the allocation map.
-
Method Details
-
create
SourcingResult create(AbstractOrderEntryModel orderEntry, SourcingLocation sourcingLocation, Long quantity) Create a sourcing result.- Parameters:
orderEntry- the abstract order entry modelsourcingLocation- the location from where to source the product.quantity- the quantity to source for this product and this location.- Returns:
- the sourcing result
-
create
SourcingResult create(Collection<AbstractOrderEntryModel> orderEntries, SourcingLocation sourcingLocation) Create a sourcing result where all order entries are sourced from the given sourcingLocation and using the quantity specified byAbstractOrderEntryModel#getQuantityUnallocated().- Parameters:
orderEntries- - the collection of abstract order entry modelsourcingLocation- - the location from where to source the product- Returns:
- the sourcing result
-
create
SourcingResult create(Map<AbstractOrderEntryModel, Long> allocation, SourcingLocation sourcingLocation) Create a sourcing result where all order entries are sourced from the given sourcingLocation and using the quantity specified in the allocation map.- Parameters:
allocation- - the map of abstract order entry model and the quantity allocatedsourcingLocation- - the location from where to source the product- Returns:
- the sourcing result
-
create
Create a single sourcing result from a collection of sourcing results.- Parameters:
results- - the collection of sourcing results; should not be null- Returns:
- the merged sourcing result; never null
-