List<ISection> associatedSections = null; if (parentSection == null) { associatedSections = getAssociatedSectionsWhithSiteAsParent(); } else { associatedSections = parentSection.getAssociatedSections(); }
List<ISection> associatedSections = Section.getSections(parentSection, this);
    private Integer organizeExistingSectionsOrder(final ISection parentSection, int sectionOrder) {        List<ISection> associatedSections = null;        if (parentSection == null) { // Then parent is Site            associatedSections = getAssociatedSectionsWhithSiteAsParent();        } else {            associatedSections = parentSection.getAssociatedSections();        }        if (associatedSections != null) {            if (sectionOrder == -1) {                sectionOrder = associatedSections.size();            }            for (final ISection section : associatedSections) {                int oldSectionOrder = section.getSectionOrder();                if (oldSectionOrder >= sectionOrder) {                    section.setSectionOrder(oldSectionOrder + 1);                }            }        }        return sectionOrder;    }