package com.megatim.fdxconsultation.core.ifaces.abtracts; import com.megatim.fdxcommons.model.pojo.CriteriaEntityFromView; import com.megatim.fdxcommons.model.pojo.OrderByDefinition; import com.megatim.fdxconsultation.dao.ifaces.abstracts.PaginationWithCriteriaEntityDAO; import java.util.List; /** * * @author ASUS */ public interface PaginationWithCriteriaEntity { PaginationWithCriteriaEntityDAO paginationWithCriteriaEntityDAO(); public default List findWithPagination(CriteriaEntityFromView criterion, List fetchEagerFields, List orderByFields, Integer pageNumber, Integer pageSize) throws Exception { return paginationWithCriteriaEntityDAO().findWithPagination(criterion, fetchEagerFields, orderByFields, pageNumber, pageSize); } public default List findAll(CriteriaEntityFromView criterion, List fetchEagerFields, List orderByFields) throws Exception { return paginationWithCriteriaEntityDAO().findAll(criterion, fetchEagerFields, orderByFields); } public default Long count(CriteriaEntityFromView criterion) throws Exception { return paginationWithCriteriaEntityDAO().count(criterion); } }