public interface StateTransformService
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.states.StateDraft>> |
toStateDrafts(java.util.List<io.sphere.sdk.states.State> states)
Transforms States by resolving the references and map them to StateDrafts.
|
@Nonnull java.util.concurrent.CompletableFuture<java.util.List<io.sphere.sdk.states.StateDraft>> toStateDrafts(@Nonnull java.util.List<io.sphere.sdk.states.State> states)
This method resolves(fetch key values for the reference id's) non null and unexpanded
references of the StateState
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 State to StateDraft by performing reference resolution considering idToKey value from the cache.
states
- the states to resolve the references.