/** * This method will return the amount of results that would be generated for this CriteriaQuery as an integer * * @param context * The standard DSpace Context object * @param criteriaQuery * The CriteriaQuery for which this result will be retrieved * @param criteriaBuilder * The CriteriaBuilder that accompagnies the CriteriaQuery * @param root * The root that'll determine on which class object we need to calculate the result * @return The amount of results that would be found by this CriteriaQuery as an integer value * @throws SQLException */ public int count(Context context, CriteriaQuery criteriaQuery, CriteriaBuilder criteriaBuilder, Root<T> root) throws SQLException { return Math.toIntExact(countLong(context, criteriaQuery, criteriaBuilder, root)); }