Hi,
I'm looking for the way to return the number of element of a criteria query
here is a normal query I use I want to have the same parameter but I only want the number of element
Code:
List<Criterion> criterions = new ArrayList<Criterion>();
criterions.add(Property.forName("id.marketId").eq(marketId));
Criterion myExpressionModel = Expression.like("modelId", filterModel, MatchMode.ANYWHERE).ignoreCase();
Criterion myExpressionChassis = Expression.like("chassis", filterChassis, MatchMode.ANYWHERE).ignoreCase();
criterions.add(myExpressionModel);
criterions.add(myExpressionChassis);
List<ProductDb> products = this.productDbDao.findByCriterions(criterions, refPos, refSize);