InfoWebSiteSection infoWebSiteSection = Cloner .copyIWebSiteSection2InfoWebSiteSection(section);  List webSiteItems = persistentWebSiteItem.readAllWebSiteItemsByWebSiteSection(section); List infoWebSiteItems = (List) CollectionUtils.collect(webSiteItems, new Transformer() { public Object transform(Object arg0) { IWebSiteItem webSiteItem = (IWebSiteItem) arg0; InfoWebSiteItem infoWebSiteItem = Cloner .copyIWebSiteItem2InfoWebSiteItem(webSiteItem);  return infoWebSiteItem; } });  Collections.sort(infoWebSiteItems, new BeanComparator("creationDate")); if (infoWebSiteSection.getSortingOrder().equals("descendent")) { Collections.reverse(infoWebSiteItems); }  infoWebSiteSection.setInfoItemsList(infoWebSiteItems);  infoWebSiteSections.add(Cloner.copyIWebSiteSection2InfoWebSiteSection(section)); }  } catch (ExcepcaoPersistencia ex) { ex.printStackTrace(); FenixServiceException newEx = new FenixServiceException(""); newEx.fillInStackTrace(); throw newEx;
infoWebSiteSections.add(Cloner.copyIWebSiteSection2InfoWebSiteSection(section));
    public InfoWebSite run(Integer webSiteCode) throws ExcepcaoInexistente, FenixServiceException {        IWebSite webSite = null;        List infoWebSiteSections = new ArrayList();        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IPersistentWebSite persistentWebSite = sp.getIPersistentWebSite();            IPersistentWebSiteSection persistentWebSiteSection = sp.getIPersistentWebSiteSection();            IPersistentWebSiteItem persistentWebSiteItem = sp.getIPersistentWebSiteItem();            webSite = (IWebSite) persistentWebSite.readByOID(WebSite.class, webSiteCode);            if (webSite == null) {                throw new NonExistingServiceException("message.nonExistingWebSite", null);            }            List webSiteSections = persistentWebSiteSection.readByWebSite(webSite);            Iterator iterSections = webSiteSections.iterator();            while (iterSections.hasNext()) {                WebSiteSection section = (WebSiteSection) iterSections.next();                InfoWebSiteSection infoWebSiteSection = Cloner                        .copyIWebSiteSection2InfoWebSiteSection(section);                List webSiteItems = persistentWebSiteItem.readAllWebSiteItemsByWebSiteSection(section);                List infoWebSiteItems = (List) CollectionUtils.collect(webSiteItems, new Transformer() {                    public Object transform(Object arg0) {                        IWebSiteItem webSiteItem = (IWebSiteItem) arg0;                        InfoWebSiteItem infoWebSiteItem = Cloner                                .copyIWebSiteItem2InfoWebSiteItem(webSiteItem);                        return infoWebSiteItem;                    }                });                Collections.sort(infoWebSiteItems, new BeanComparator("creationDate"));                if (infoWebSiteSection.getSortingOrder().equals("descendent")) {                    Collections.reverse(infoWebSiteItems);                }                infoWebSiteSection.setInfoItemsList(infoWebSiteItems);                infoWebSiteSections.add(Cloner.copyIWebSiteSection2InfoWebSiteSection(section));            }        } catch (ExcepcaoPersistencia ex) {            ex.printStackTrace();            FenixServiceException newEx = new FenixServiceException("");            newEx.fillInStackTrace();            throw newEx;        }        InfoWebSite infoWebSite = new InfoWebSite();        infoWebSite.setName(webSite.getName());        infoWebSite.setSections(infoWebSiteSections);        return infoWebSite;    }