DATACMNS-33 - Adapted API changes for Repository.count().
Also changed return types for count() methods on QueryDslPredicateExecutor.
This commit is contained in:
@@ -159,7 +159,7 @@ public class QueryDslMongoRepository<T, ID extends Serializable> extends
|
||||
* org.springframework.data.document.mongodb.repository.QueryDslExecutor
|
||||
* #count(com.mysema.query.types.Predicate)
|
||||
*/
|
||||
public Long count(Predicate predicate) {
|
||||
public long count(Predicate predicate) {
|
||||
|
||||
return createQueryFor(predicate).count();
|
||||
}
|
||||
|
||||
@@ -70,5 +70,5 @@ public interface QueryDslPredicateExecutor<T> {
|
||||
* @param predicate the {@link Predicate} to count instances for
|
||||
* @return the number of instances
|
||||
*/
|
||||
Long count(Predicate predicate);
|
||||
long count(Predicate predicate);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class SimpleMongoRepository<T, ID extends Serializable> implements Paging
|
||||
*
|
||||
* @see org.springframework.data.repository.Repository#count()
|
||||
*/
|
||||
public Long count() {
|
||||
public long count() {
|
||||
|
||||
return template.getCollection(entityInformation.getCollectionName()).count();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user