Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.PropertiesCategory


        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);
View Full Code Here


  {
    Database db = beginTransaction();

    try
    {
      PropertiesCategory propertiesCategory = createWithDatabase(c, db);
      commitTransaction(db);
      return propertiesCategory.getValueObject();
    }
    catch (Exception e)
    {
      rollbackTransaction(db);
      throw new SystemException(e.getMessage());
View Full Code Here

    // Need this crappy hack to forge the relationship (castor completely sucks like this)
    // TODO: When hibernate comes, just save the VOs and if it has a child VO with an id set
    // TODO: it is used to make the relationship...ask me for clarification -frank
    Category category = (Category)getObjectWithId(CategoryImpl.class, c.getCategory().getId(), db);

    PropertiesCategory propertiesCategory = new PropertiesCategoryImpl();
    propertiesCategory.setValueObject(c);
    propertiesCategory.setCategory((CategoryImpl)category);
    db.create(propertiesCategory);
    return propertiesCategory;
  }
View Full Code Here

          List propertiesCategoryList = PropertiesCategoryController.getController().findByPropertiesAttribute(attribute, GroupProperties.class.getName(), groupPropertyVO.getId(), db);

          Iterator propertiesCategoryListIterator = propertiesCategoryList.iterator();
          while(propertiesCategoryListIterator.hasNext())
          {
              PropertiesCategory propertiesCategory = (PropertiesCategory)propertiesCategoryListIterator.next();
              relatedCategories.add(propertiesCategory.getCategory());
          }
      }
    }
    catch(Exception e)
    {
View Full Code Here

          List propertiesCategoryList = PropertiesCategoryController.getController().findByPropertiesAttributeReadOnly(attribute, GroupProperties.class.getName(), groupPropertyVO.getId(), db);

          Iterator propertiesCategoryListIterator = propertiesCategoryList.iterator();
          while(propertiesCategoryListIterator.hasNext())
          {
              PropertiesCategory propertiesCategory = (PropertiesCategory)propertiesCategoryListIterator.next();
              relatedCategories.add(propertiesCategory.getCategory());
          }
      }
    }
    catch(Exception e)
    {
View Full Code Here

              List propertiesCategoryList = PropertiesCategoryController.getController().findByPropertiesAttributeReadOnly(attribute, GroupProperties.class.getName(), groupPropertyVO.getId(), db);
         
              Iterator propertiesCategoryListIterator = propertiesCategoryList.iterator();
              while(propertiesCategoryListIterator.hasNext())
              {
                  PropertiesCategory propertiesCategory = (PropertiesCategory)propertiesCategoryListIterator.next();
                  relatedCategories.add(propertiesCategory.getCategory().getValueObject());
              }
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.PropertiesCategory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.