List 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 int organizeExistingSectionsOrder(ISection superiorSection, ISite site,            int insertSectionOrder) throws FenixServiceException, ExcepcaoPersistencia {        IPersistentSection persistentSection = null;        ISuportePersistente persistentSuport = PersistenceSupportFactory.getDefaultPersistenceSupport();        persistentSection = persistentSuport.getIPersistentSection();        List sectionsList = persistentSection.readBySiteAndSection(site, superiorSection);        if (sectionsList != null) {            if (insertSectionOrder == -1) {                insertSectionOrder = sectionsList.size();            }            Iterator iterSections = sectionsList.iterator();            while (iterSections.hasNext()) {                ISection iterSection = (ISection) iterSections.next();                int sectionOrder = iterSection.getSectionOrder().intValue();                if (sectionOrder >= insertSectionOrder) {                    persistentSection.simpleLockWrite(iterSection);                    iterSection.setSectionOrder(new Integer(sectionOrder + 1));                }            }        }        return insertSectionOrder;    }