Class SapProductAvailabilityCache
java.lang.Object
de.hybris.platform.sap.sapproductavailability.backend.impl.SapProductAvailabilityCache
Cache helper adds/retrieves objects from cache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CacheAccessprotected CacheAccessprotected CacheAccessprotected CacheAccess -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd plant to cachevoidcachePlantCustomer(String plant, String material, String customerId, String salesOrg, String disChannel) cache plant customervoidcachePlantMaterial(String plant, String material, String salesOrg, String disChannel) Cache plant materialvoidcacheProductAvailability(SapProductAvailability availability, ProductModel product, String customerId, String plant, Long quantity) add SapProductAvailability to cache, in case of failure log errorprotected StringcreateCacheKey(ProductModel product, String customerId, String plant, Long quantity) protected StringcreateCacheKey(String material, String customerId, String salesOrg, String disChannel) readCachedPlant(String material, String customerId, String salesOrg, String disChannel) read cached plantreadCachedPlantCustomer(String material, String customerId, String salesOrg, String disChannel) read cached plant for customerreadCachedPlantMaterial(String material, String salesOrg, String disChannel) read cached material plantreadCachedProductAvailability(ProductModel product, String customerId, String plant, Long quantity) read SapProductAvailability from cache
-
Field Details
-
plantCacheAccess
-
plantMaterialCacheAccess
-
plantCustomerCacheAccess
-
atpCacheAccess
-
-
Constructor Details
-
SapProductAvailabilityCache
public SapProductAvailabilityCache()
-
-
Method Details
-
readCachedProductAvailability
public SapProductAvailability readCachedProductAvailability(ProductModel product, String customerId, String plant, Long quantity) read SapProductAvailability from cache- Parameters:
product-customerId-plant-quantity-- Returns:
- SapProductAvailability
-
cacheProductAvailability
public void cacheProductAvailability(SapProductAvailability availability, ProductModel product, String customerId, String plant, Long quantity) add SapProductAvailability to cache, in case of failure log error- Parameters:
availability-product-customerId-plant-quantity-
-
cachePlant
public void cachePlant(String plant, String material, String customerId, String salesOrg, String disChannel) add plant to cache- Parameters:
plant-material-customerId-salesOrg-disChannel-
-
readCachedPlant
public String readCachedPlant(String material, String customerId, String salesOrg, String disChannel) read cached plant- Parameters:
material-customerId-salesOrg-disChannel-- Returns:
- String Plant
-
createCacheKey
-
cachePlantMaterial
Cache plant material- Parameters:
plant-material-salesOrg-disChannel-
-
readCachedPlantMaterial
read cached material plant- Parameters:
material-salesOrg-disChannel-- Returns:
- String plant
-
cachePlantCustomer
public void cachePlantCustomer(String plant, String material, String customerId, String salesOrg, String disChannel) cache plant customer- Parameters:
plant-material-customerId-salesOrg-disChannel-
-
readCachedPlantCustomer
public String readCachedPlantCustomer(String material, String customerId, String salesOrg, String disChannel) read cached plant for customer- Parameters:
material-customerId-salesOrg-disChannel-- Returns:
- cached Plant
-
createCacheKey
protected String createCacheKey(ProductModel product, String customerId, String plant, Long quantity)
-