public interface ProductLookupService<P extends Product> extends CacheLookups
CONTENT_PUBLISH_CACHE_NAME, PRODUCT_LOOKUP_CACHE_NAME, PRODUCT_SEARCH_CACHE_NAME, TEMPLATEPAGE_MAPPING_CACHE_NAME| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the entire cache
|
P |
getCategory(Long id)
Should be used to fetch a Category / Parent Product
WARNING : COULD BE USED ON ANY PRODUCT, HOWEVER APPLY CAUTION NOT TO CALL FOR ANY PRODUCT AS ON CALL THEY WILL BE CACHED |
P |
getCategory(String name)
Should be used to fetch a Category / Parent Product
WARNING : COULD BE USED ON ANY PRODUCT, HOWEVER APPLY CAUTION NOT TO CALL FOR ANY PRODUCT AS ON CALL THEY WILL BE CACHED |
List<P> |
getParents(P p)
For a given product fetch all its parents
The first element in the List is the immediate parent, the last the root node |
@Cacheable(key="{ #root.methodName, #p.parentId }",
value="productLookup")
List<P> getParents(P p)
p - as Product @nullable false@Cacheable(key="#name",
value="productLookup")
P getCategory(String name)
name - as name of Category / Parent Product @nullable false@Cacheable(key="{ #root.methodName, #id }",
value="productLookup")
P getCategory(Long id)
id - as od of Category / Parent Product @nullable false@CacheEvict(value="productLookup",
allEntries=true)
void clear()
Copyright © 2018. All rights reserved.