Interface CustomerTransformService
-
- All Known Implementing Classes:
CustomerTransformServiceImpl
public interface CustomerTransformService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.customers.CustomerDraft>>
toCustomerDrafts(java.util.List<io.sphere.sdk.customers.Customer> customers)
Transforms customers by resolving the references and map them to CustomerDrafts.
-
-
-
Method Detail
-
toCustomerDrafts
@Nonnull java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.customers.CustomerDraft>> toCustomerDrafts(@Nonnull java.util.List<io.sphere.sdk.customers.Customer> customers)
Transforms customers by resolving the references and map them to CustomerDrafts.This method resolves(fetch key values for the reference id's) non null and unexpanded references of the customer
Customer
by using 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's and store the idToKey value pair in the cache for reuse.
Then maps the Customer to CustomerDraft by performing reference resolution considering idToKey value from the cache.
- Parameters:
customers
- the customers to resolve the references.- Returns:
- a new list which contains customerDrafts which have all their references resolved.
-
-