public interface ProductTypeTransformService
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft>> |
toProductTypeDrafts(java.util.List<io.sphere.sdk.producttypes.ProductType> productTypes)
Transforms productTypes by resolving the references and map them to ProductTypeDrafts.
|
@Nonnull java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft>> toProductTypeDrafts(@Nonnull java.util.List<io.sphere.sdk.producttypes.ProductType> productTypes)
This method replaces the ids on attribute references with keys. It resolves(fetch key value
for the reference id) the non-null unexpanded references in the productTypeProductType
by using a cache.
If the reference ids are already cached, key values are pulled from the cache, otherwise it executes the query to fetch the key value for the reference id and store in the cache.
Then maps the ProductType to ProductTypeDraft by performing reference resolution considering idToKey value from the cache.
productTypes
- the productTypes to replace the references and attributes ids with keys.