This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public <T> Page<T> pageAggregation( | |
| final Pageable pageable, | |
| final Criteria criteria, | |
| final String collection, | |
| final Class<T> clazz) { | |
| long count; | |
| if (criteria.getCriteriaObject().isEmpty()) { | |
| count = Optional | |
| .of(mongoTemplate.estimatedCount(clazz)) | |
| .orElse(0L); |