CategoryData c = (CategoryData) it.next(); cg.linkCategory((Category)mapper.map(c));
CategoryData cd = (CategoryData) it.next(); Category c = (Category)mapper.map( cd ); if ( ! linked( c.findCategoryGroupCategoryLink( cg ))) cg.linkCategory( c );
    public IObject fillIObject( IObject obj, ReverseModelMapper mapper)    {        if ( obj instanceof CategoryGroup)        {            CategoryGroup cg = (CategoryGroup) obj;                        if (super.fill(cg)) {                cg.setName(this.getName());                cg.setDescription(this.getDescription());                if (this.getCategories() != null) {                    for (Iterator it = this.getCategories().iterator(); it.hasNext();)                    {                        CategoryData c = (CategoryData) it.next();                        cg.linkCategory((Category)mapper.map(c));                    }                }            }            return cg;                    } else {            throw new IllegalArgumentException(                    "CategoryGroupData can only fille CategoryData.");        }    }