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<T, ID> {
|
|
PaginationWithCriteriaEntityDAO<T, ID> paginationWithCriteriaEntityDAO();
|
|
public default List<T> findWithPagination(CriteriaEntityFromView criterion, List<String> fetchEagerFields, List<OrderByDefinition> orderByFields, Integer pageNumber, Integer pageSize) throws Exception {
|
return paginationWithCriteriaEntityDAO().findWithPagination(criterion, fetchEagerFields, orderByFields, pageNumber, pageSize);
|
}
|
|
public default List<T> findAll(CriteriaEntityFromView criterion, List<String> fetchEagerFields, List<OrderByDefinition> orderByFields) throws Exception {
|
return paginationWithCriteriaEntityDAO().findAll(criterion, fetchEagerFields, orderByFields);
|
}
|
|
public default Long count(CriteriaEntityFromView criterion) throws Exception {
|
return paginationWithCriteriaEntityDAO().count(criterion);
|
}
|
}
|