public final class InventoryReferenceResolutionUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<io.sphere.sdk.inventory.InventoryEntryDraft> |
mapToInventoryEntryDrafts(java.util.List<io.sphere.sdk.inventory.InventoryEntry> inventoryEntries,
ReferenceIdToKeyCache referenceIdToKeyCache)
Returns an
List <InventoryEntryDraft > consisting of the results of
applying the mapping from InventoryEntry to InventoryEntryDraft with
considering reference resolution. |
@Nonnull public static java.util.List<io.sphere.sdk.inventory.InventoryEntryDraft> mapToInventoryEntryDrafts(@Nonnull java.util.List<io.sphere.sdk.inventory.InventoryEntry> inventoryEntries, @Nonnull ReferenceIdToKeyCache referenceIdToKeyCache)
List
<InventoryEntryDraft
> consisting of the results of
applying the mapping from InventoryEntry
to InventoryEntryDraft
with
considering reference resolution.
Reference field | from | to |
---|---|---|
supplyChannel | Reference <Channel > |
ResourceIdentifier <Channel > |
custom.type | Reference <Type > |
ResourceIdentifier <Type > |
Note: The Channel
and Type
reference should contain Id in the
map(cache) with a key value. Any reference, which have its id in place and not replaced by the
key, it would not be found in the map. In this case, this reference will be considered as
existing resources on the target commercetools project and the library will issues an
update/create API request without reference resolution.
inventoryEntries
- the inventory entries without expansion of references.referenceIdToKeyCache
- the instance that manages cache.List
of InventoryEntryDraft
built from the supplied List
of
InventoryEntry
.