*/
public CategoryVO findByPath(String path, Database db) throws SystemException
{
String key = "" + path;
CategoryVO categoryVO = (CategoryVO)CacheController.getCachedObjectFromAdvancedCache("categoryCache", key);
if(categoryVO != null)
{
logger.info("There was an cached categoryVO:" + categoryVO);
}
else
{
String[] nodes = path.substring(1).split("/");
if(nodes.length > 0)
{
List rootCategories = findRootCategoryVOList(db);
String name = nodes[0];
categoryVO = getCategoryVOWithNameInList(rootCategories, name);
for(int i = 1; i < nodes.length; i++)
{
categoryVO = getCategoryVOWithNameInList(findByParent(categoryVO.getId(), db), nodes[i]);
}
}
if(categoryVO != null)
CacheController.cacheObjectInAdvancedCache("categoryCache", key, categoryVO);