package it.micegroup.gestioneferie.pianificazioneferie.service;

import it.micegroup.gestioneferie.pianificazioneferie.entity.DrichiesteApprovazPf;
import it.micegroup.gestioneferie.pianificazioneferie.criteria.DrichiesteApprovazPfCriteria;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import it.micegroup.gestioneferie.pianificazioneferie.entity.DrichiesteApprovazPfKey;

import it.micegroup.gestioneferie.pianificazioneferie.entity.DstatiRichApprovPf;
import it.micegroup.gestioneferie.pianificazioneferie.entity.DpianiFerie;
import it.micegroup.gestioneferie.pianificazioneferie.entity.DstatiRichApprovPfKey;
import it.micegroup.gestioneferie.libs.service.BaseEntityService;
import it.micegroup.voila2runtime.exception.BusinessException;

public interface DrichiesteApprovazPfService
		extends BaseEntityService<DrichiesteApprovazPf, DrichiesteApprovazPfKey, DrichiesteApprovazPfCriteria> {

	// PARENT-SPECIFIC SERVICES
	Page<DrichiesteApprovazPf> findByTheDstatiRichApprovPf(DstatiRichApprovPf parentEntity, Pageable pageable);

	Page<DrichiesteApprovazPf> findByTheDpianiFerie(DpianiFerie parentEntity, Pageable pageable);

	/**
	 * Return a list of DstatiRichApprovPf from all DrichiesteApprovazPf with given
	 * theDstatiRichApprovPf
	 *
	 * @param dpianiFerie
	 * @param pageable
	 * @return list of DstatiRichApprovPf from all DrichiesteApprovazPf with given
	 *         TheDstatiRichApprovPf
	 */
	Page<DstatiRichApprovPf> findDstatiRichApprovPfByTheDpianiFerie(DpianiFerie dpianiFerie, Pageable pageable);

	/**
	 * Return a list of DpianiFerie from all DrichiesteApprovazPf with given
	 * theDpianiFerie
	 *
	 * @param dstatiRichApprovPf
	 * @param pageable
	 * @return list of DpianiFerie from all DrichiesteApprovazPf with given
	 *         TheDpianiFerie
	 */
	Page<DpianiFerie> findDpianiFerieByTheDstatiRichApprovPf(DstatiRichApprovPf dstatiRichApprovPf, Pageable pageable);

	DrichiesteApprovazPf bulkUpdate(DrichiesteApprovazPf drichiesteApprovazPf);

}
