List sectionsList = null; sectionsList = persistentSection.readBySiteAndSection(site, superiorSection);
List sectionsList = null; if(superiorSection != null){ sectionsList = persistentSection.readBySiteAndSection(site.getExecutionCourse().getSigla(), site.getExecutionCourse().getExecutionPeriod().getName(), site.getExecutionCourse().getExecutionPeriod().getExecutionYear().getYear(), superiorSection.getIdInternal()); } else{ sectionsList = persistentSection.readBySiteAndSection(site.getExecutionCourse().getSigla(), site.getExecutionCourse().getExecutionPeriod().getName(), site.getExecutionCourse().getExecutionPeriod().getExecutionYear().getYear(), null); }
    private Integer organizeSectionsOrder(Integer newOrder, Integer oldOrder, ISection superiorSection,            ISite site) throws FenixServiceException, ExcepcaoPersistencia {        ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport();        IPersistentSection persistentSection = persistentSuport.getIPersistentSection();        List sectionsList = null;        sectionsList = persistentSection.readBySiteAndSection(site, superiorSection);        Iterator iterSections = sectionsList.iterator();        if (newOrder.intValue() == -2) {            newOrder = new Integer(sectionsList.size() - 1);        }        if (newOrder.intValue() - oldOrder.intValue() > 0) {            while (iterSections.hasNext()) {                ISection iterSection = (ISection) iterSections.next();                int iterSectionOrder = iterSection.getSectionOrder().intValue();                if (iterSectionOrder > oldOrder.intValue() && iterSectionOrder <= newOrder.intValue()) {                    persistentSection.simpleLockWrite(iterSection);                    iterSection.setSectionOrder(new Integer(iterSectionOrder - 1));                }            }        } else {            while (iterSections.hasNext()) {                ISection iterSection = (ISection) iterSections.next();                int iterSectionOrder = iterSection.getSectionOrder().intValue();                if (iterSectionOrder >= newOrder.intValue() && iterSectionOrder < oldOrder.intValue()) {                    persistentSection.simpleLockWrite(iterSection);                    iterSection.setSectionOrder(new Integer(iterSectionOrder + 1));                }            }        }        return newOrder;    }