DATACMNS-33 - Adapted API changes for Repository.count().

Also changed return types for count() methods on QueryDslPredicateExecutor.
This commit is contained in:
Oliver Gierke
2011-04-21 10:02:59 +02:00
parent 399beff795
commit fe74557c95
3 changed files with 3 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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();
}