public class DefaultSourcingResultFactory extends java.lang.Object implements SourcingResultFactory
SourcingResult.| Constructor and Description |
|---|
DefaultSourcingResultFactory() |
| Modifier and Type | Method and Description |
|---|---|
SourcingResult |
create(AbstractOrderEntryModel orderEntry,
SourcingLocation sourcingLocation,
java.lang.Long quantity)
Create a sourcing result.
|
SourcingResult |
create(java.util.Collection<AbstractOrderEntryModel> orderEntries,
SourcingLocation sourcingLocation)
Create a sourcing result where all order entries are sourced from the given sourcingLocation and using the
quantity specified by
AbstractOrderEntryModel#getQuantityUnallocated(). |
SourcingResults |
create(java.util.Collection<SourcingResults> results)
Create a single sourcing result from a collection of sourcing results.
|
SourcingResult |
create(java.util.Map<AbstractOrderEntryModel,java.lang.Long> allocations,
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.
|
protected void |
mergeResults(SourcingResults source,
SourcingResults target)
Merges the sourcing results of the source and target results containers into the target container. This
implementation will set the collections in the target as type
HashSet and merges the collections
using Iterables#concat(Iterable, Iterable). |
public SourcingResult create(AbstractOrderEntryModel orderEntry, SourcingLocation sourcingLocation, java.lang.Long quantity)
SourcingResultFactorycreate in interface SourcingResultFactoryorderEntry - the abstract order entry modelsourcingLocation - the location from where to source the product.quantity - the quantity to source for this product and this location.public SourcingResult create(java.util.Collection<AbstractOrderEntryModel> orderEntries, SourcingLocation sourcingLocation)
SourcingResultFactoryAbstractOrderEntryModel#getQuantityUnallocated().create in interface SourcingResultFactoryorderEntries - - the collection of abstract order entry modelsourcingLocation - - the location from where to source the productpublic SourcingResult create(java.util.Map<AbstractOrderEntryModel,java.lang.Long> allocations, SourcingLocation sourcingLocation)
SourcingResultFactorycreate in interface SourcingResultFactoryallocations - - the map of abstract order entry model and the quantity allocatedsourcingLocation - - the location from where to source the productpublic SourcingResults create(java.util.Collection<SourcingResults> results)
SourcingResultFactorycreate in interface SourcingResultFactoryresults - - the collection of sourcing results; should not be nullprotected void mergeResults(SourcingResults source, SourcingResults target)
HashSet and merges the collections
using Iterables#concat(Iterable, Iterable).source - - the source containertarget - - the target containerCopyright © 2018 SAP SE. All Rights Reserved.