@@ -938,7 +938,9 @@ public long getCount(@Nullable final DBObject query) {
938938 * @return the number of documents that matches selection criteria
939939 * @throws MongoException if the operation failed
940940 * @mongodb.driver.manual reference/command/count/ Count
941+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
941942 */
943+ @ Deprecated
942944 public long getCount (@ Nullable final DBObject query , final DBObject projection ) {
943945 return getCount (query , projection , 0 , 0 );
944946 }
@@ -952,7 +954,9 @@ public long getCount(@Nullable final DBObject query, final DBObject projection)
952954 * @return the number of documents that matches selection criteria
953955 * @throws MongoException if the operation failed
954956 * @mongodb.driver.manual reference/command/count/ Count
957+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
955958 */
959+ @ Deprecated
956960 public long getCount (@ Nullable final DBObject query , @ Nullable final DBObject projection , final ReadPreference readPreference ) {
957961 return getCount (query , projection , 0 , 0 , readPreference );
958962 }
@@ -967,7 +971,9 @@ public long getCount(@Nullable final DBObject query, @Nullable final DBObject pr
967971 * @return the number of documents that matches selection criteria
968972 * @throws MongoException if the operation failed
969973 * @mongodb.driver.manual reference/command/count/ Count
974+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
970975 */
976+ @ Deprecated
971977 public long getCount (@ Nullable final DBObject query , @ Nullable final DBObject projection , final long limit , final long skip ) {
972978 return getCount (query , projection , limit , skip , getReadPreference ());
973979 }
@@ -983,7 +989,9 @@ public long getCount(@Nullable final DBObject query, @Nullable final DBObject pr
983989 * @return the number of documents that matches selection criteria
984990 * @throws MongoException if the operation failed
985991 * @mongodb.driver.manual reference/command/count/ Count
992+ * @deprecated Prefer {@link #count(DBObject, DBCollectionCountOptions)}
986993 */
994+ @ Deprecated
987995 public long getCount (@ Nullable final DBObject query , @ Nullable final DBObject projection , final long limit , final long skip ,
988996 final ReadPreference readPreference ) {
989997 return getCount (query , new DBCollectionCountOptions ().limit (limit ).skip (skip ).readPreference (readPreference ));
0 commit comments