String groupName = "";
List groupPropertyValues = new ArrayList();
while (results.hasMore())
{
GroupProperties groupProperties = (GroupProperties)results.next();
if(!groupProperties.getGroupName().equals(groupName))
{
String cacheKey = "" + groupName + "_" + languageVO.getId();
logger.info("Caching for " + cacheKey + ":" + groupPropertyValues.size());
CacheController.cacheObject("groupPropertiesCache", cacheKey, groupPropertyValues);
groupPropertyValues = new ArrayList();
groupName = groupProperties.getGroupName();
}
groupPropertyValues.add(groupProperties.getValueObject());
}
if(groupName != null)
{
String cacheKey = "" + groupName + "_" + languageVO.getId();
CacheController.cacheObject("groupPropertiesCache", cacheKey, groupPropertyValues);