Class BaseTransformServiceImpl
- java.lang.Object
-
- com.commercetools.sync.services.impl.BaseTransformServiceImpl
-
- Direct Known Subclasses:
CartDiscountTransformServiceImpl
,CategoryTransformServiceImpl
,CustomerTransformServiceImpl
,InventoryEntryTransformServiceImpl
,ProductTransformServiceImpl
,ProductTypeTransformServiceImpl
,ShoppingListTransformServiceImpl
,StateTransformServiceImpl
public abstract class BaseTransformServiceImpl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
CHUNK_SIZE
static java.lang.String
KEY_IS_NOT_SET_PLACE_HOLDER
protected ReferenceIdToKeyCache
referenceIdToKeyCache
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseTransformServiceImpl(io.sphere.sdk.client.SphereClient ctpClient, ReferenceIdToKeyCache referenceIdToKeyCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <U extends io.sphere.sdk.models.Resource<U> & io.sphere.sdk.models.WithKey>
voidcacheResourceReferenceKeys(java.util.List<U> results)
protected void
cacheResourceReferenceKeys(java.util.Set<ResourceKeyId> results)
protected java.util.List<ResourceIdsGraphQlRequest>
createResourceIdsGraphQlRequests(java.util.List<java.util.List<java.lang.String>> chunkedIds, GraphQlQueryResources resourceType)
protected java.util.concurrent.CompletableFuture<java.lang.Void>
fetchAndFillReferenceIdToKeyCache(java.util.Set<java.lang.String> ids, GraphQlQueryResources requestType)
protected io.sphere.sdk.client.SphereClient
getCtpClient()
protected java.util.Set<java.lang.String>
getNonCachedReferenceIds(java.util.Set<java.lang.String> referenceIds)
-
-
-
Field Detail
-
CHUNK_SIZE
public static final int CHUNK_SIZE
- See Also:
- Constant Field Values
-
KEY_IS_NOT_SET_PLACE_HOLDER
public static final java.lang.String KEY_IS_NOT_SET_PLACE_HOLDER
- See Also:
- Constant Field Values
-
referenceIdToKeyCache
protected final ReferenceIdToKeyCache referenceIdToKeyCache
-
-
Constructor Detail
-
BaseTransformServiceImpl
protected BaseTransformServiceImpl(@Nonnull io.sphere.sdk.client.SphereClient ctpClient, @Nonnull ReferenceIdToKeyCache referenceIdToKeyCache)
-
-
Method Detail
-
getCtpClient
protected io.sphere.sdk.client.SphereClient getCtpClient()
-
fetchAndFillReferenceIdToKeyCache
protected java.util.concurrent.CompletableFuture<java.lang.Void> fetchAndFillReferenceIdToKeyCache(@Nonnull java.util.Set<java.lang.String> ids, @Nonnull GraphQlQueryResources requestType)
-
createResourceIdsGraphQlRequests
@Nonnull protected java.util.List<ResourceIdsGraphQlRequest> createResourceIdsGraphQlRequests(@Nonnull java.util.List<java.util.List<java.lang.String>> chunkedIds, @Nonnull GraphQlQueryResources resourceType)
-
getNonCachedReferenceIds
@Nonnull protected java.util.Set<java.lang.String> getNonCachedReferenceIds(@Nonnull java.util.Set<java.lang.String> referenceIds)
-
cacheResourceReferenceKeys
protected void cacheResourceReferenceKeys(java.util.Set<ResourceKeyId> results)
-
cacheResourceReferenceKeys
protected <U extends io.sphere.sdk.models.Resource<U> & io.sphere.sdk.models.WithKey> void cacheResourceReferenceKeys(java.util.List<U> results)
-
-