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