Group tag;
    public Group loadRootGroup(String resource) {        Group tag;        String query = "rootGroupByResource";        Collection tags = getHibernateTemplate().findByNamedQueryAndNamedParam(query,                 RESOURCE_PARAM, resource);        if (tags.size() == 0) {            tag = new Group();            tag.setName("Default");            tag.setWeight(new Integer(0));            tag.setResource(resource);                  storeGroup(tag);        } else {            tag = (Group) CoreContextImpl.requireOneOrZero(tags, query);        }                return tag;    }