@@ -938,7 +938,9 @@ public long getCount(@Nullable final DBObject query) {
938
938
* @return the number of documents that matches selection criteria
939
939
* @throws MongoException if the operation failed
940
940
* @mongodb.driver.manual reference/command/count/ Count
941
+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
941
942
*/
943
+ @ Deprecated
942
944
public long getCount (@ Nullable final DBObject query , final DBObject projection ) {
943
945
return getCount (query , projection , 0 , 0 );
944
946
}
@@ -952,7 +954,9 @@ public long getCount(@Nullable final DBObject query, final DBObject projection)
952
954
* @return the number of documents that matches selection criteria
953
955
* @throws MongoException if the operation failed
954
956
* @mongodb.driver.manual reference/command/count/ Count
957
+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
955
958
*/
959
+ @ Deprecated
956
960
public long getCount (@ Nullable final DBObject query , @ Nullable final DBObject projection , final ReadPreference readPreference ) {
957
961
return getCount (query , projection , 0 , 0 , readPreference );
958
962
}
@@ -967,7 +971,9 @@ public long getCount(@Nullable final DBObject query, @Nullable final DBObject pr
967
971
* @return the number of documents that matches selection criteria
968
972
* @throws MongoException if the operation failed
969
973
* @mongodb.driver.manual reference/command/count/ Count
974
+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
970
975
*/
976
+ @ Deprecated
971
977
public long getCount (@ Nullable final DBObject query , @ Nullable final DBObject projection , final long limit , final long skip ) {
972
978
return getCount (query , projection , limit , skip , getReadPreference ());
973
979
}
@@ -983,7 +989,9 @@ public long getCount(@Nullable final DBObject query, @Nullable final DBObject pr
983
989
* @return the number of documents that matches selection criteria
984
990
* @throws MongoException if the operation failed
985
991
* @mongodb.driver.manual reference/command/count/ Count
992
+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
986
993
*/
994
+ @ Deprecated
987
995
public long getCount (@ Nullable final DBObject query , @ Nullable final DBObject projection , final long limit , final long skip ,
988
996
final ReadPreference readPreference ) {
989
997
return getCount (query , new DBCollectionCountOptions ().limit (limit ).skip (skip ).readPreference (readPreference ));
0 commit comments