Class InventoryEntryIdentifier
- java.lang.Object
-
- com.commercetools.sync.inventories.helpers.InventoryEntryIdentifier
-
public final class InventoryEntryIdentifier extends java.lang.Object
This class provides as a container of the unique identifier of anInventoryEntry
for the sync which is a combination of both the SKU of the inventory entry and the supply channel key of this inventory entry.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
java.lang.String
getInventoryEntryChannelKey()
java.lang.String
getInventoryEntrySku()
int
hashCode()
static InventoryEntryIdentifier
of(io.sphere.sdk.inventory.InventoryEntry inventoryEntry)
Builds anInventoryEntryIdentifier
instance given anInventoryEntry
using it's sku and supply channel id.static InventoryEntryIdentifier
of(io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
Builds anInventoryEntryIdentifier
instance given anInventoryEntryDraft
using its sku and supply channel key.static InventoryEntryIdentifier
of(java.lang.String inventoryEntrySku, java.lang.String inventoryEntryChannelKey)
Builds anInventoryEntryIdentifier
instance given an sku and supply channel id.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static InventoryEntryIdentifier of(@Nonnull io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
Builds anInventoryEntryIdentifier
instance given anInventoryEntryDraft
using its sku and supply channel key.- Parameters:
inventoryEntryDraft
- the draft to take the sku and channel key value from.- Returns:
- an instance of
InventoryEntryIdentifier
for the given draft.
-
of
public static InventoryEntryIdentifier of(@Nonnull io.sphere.sdk.inventory.InventoryEntry inventoryEntry)
Builds anInventoryEntryIdentifier
instance given anInventoryEntry
using it's sku and supply channel id.- Parameters:
inventoryEntry
- the entry to take the sku and channel id value from.- Returns:
- an instance of
InventoryEntryIdentifier
for the given entry.
-
of
public static InventoryEntryIdentifier of(@Nonnull java.lang.String inventoryEntrySku, @Nullable java.lang.String inventoryEntryChannelKey)
Builds anInventoryEntryIdentifier
instance given an sku and supply channel id.- Parameters:
inventoryEntrySku
- the SKU of the inventory entry.inventoryEntryChannelKey
- the channel key of the inventory entry.- Returns:
- an instance of
InventoryEntryIdentifier
for the given entry.
-
getInventoryEntrySku
public java.lang.String getInventoryEntrySku()
-
getInventoryEntryChannelKey
public java.lang.String getInventoryEntryChannelKey()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-