OQLQuery oql = db.getOQLQuery("SELECT c FROM org.infoglue.cms.entities.management.impl.simple.SmallPropertiesCategoryImpl c ORDER BY c.propertiesCategoryId");
QueryResults results = oql.execute(Database.READONLY);
while (results.hasMore())
{
PropertiesCategory propertiesCategory = (PropertiesCategory)results.next();
String key = "categoryVOList_" + propertiesCategory.getAttributeName() + "_" + propertiesCategory.getEntityName() + "_" + propertiesCategory.getEntityId();
List<CategoryVO> categoryVOList = (List<CategoryVO>)CacheController.getCachedObject("propertiesCategoryCache", key);
if(categoryVOList == null)
{
categoryVOList = new ArrayList<CategoryVO>();
CacheController.cacheObject("propertiesCategoryCache", key, categoryVOList);
}
if(propertiesCategory.getValueObject().getCategoryId() != null)
{
CategoryVO categoryVO = categoriesMap.get(propertiesCategory.getValueObject().getCategoryId());
if(categoryVO != null)
categoryVOList.add(categoryVO);
else
logger.info("An inconsistency found. The propertyCategory " + propertiesCategory.getId() + " pointed to a missing categoryID: " + propertiesCategory.getValueObject().getCategoryId());
/*
try
{
CategoryVO categoryVO = CategoryController.getController().findById(propertiesCategory.getValueObject().getCategoryId(), db).getValueObject();
categoryVOList.add(categoryVO);