package no.dusken.aranea.service;
import no.dusken.aranea.model.Page;
import no.dusken.aranea.model.Section;
import no.dusken.aranea.model.SectionPage;
import no.dusken.common.service.GenericService;
import java.util.List;
/**
* @author Marvin B. Lillehaug <lillehau@underdusken.no>
*/
public interface SectionPageService extends GenericService<SectionPage> {
/**
*
* @param owner - Object set as owner in the SectionPage.
* @return All SectionPage owned by owner ordered by order.
*/
public List<SectionPage> getSectionPageByOwner(Section owner);
/**
* Save all sectionPages in the list.
* @param sectionPages to be saved.
*/
public void saveOrUpdateSectionPages(List<SectionPage> sectionPages);
/**
* Cascade orderings and save all sectionPages in the list.
* @param sectionPages to be saved.
*/
public void cascadeAndSaveOrUpdateSectionPages(List<SectionPage> sectionPages);
/**
* @param s - Section
* @param ordering -
* @return SectionPage belonging to s with the ordering ordering.
*/
public SectionPage getSectionPageBySectionAndOrdering(Section s, Integer ordering);
/**
* @param s - section the SectionPage should have.
* @param p - page the SectionPage should have.
* @return The SectionPage that has s and p, if it exist. Otherwise null
*/
public SectionPage getSectionPageBySectionAndPage(Section s, Page p);
/**
* @return all SectionPages for the given page.
*/
public List<SectionPage> getSectionPagesByPage(Page page);
}