/** * returns the number of documents that match a query. * * @param query query to match * @return The count * @throws MongoException If an error occurred */ public long count(DBObject query) throws MongoException { return getCount(query, null); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long)} with limit=0 and skip=0 * * @param query query to match * @param fields fields to return * @return The count * @throws MongoException If an error occurred */ public long getCount(T query, T fields) throws MongoException { return getCount(query, fields, 0, 0); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject)} with null fields. * * @param query query to match * @return The count * @throws MongoException If an error occurred */ public long getCount(DBObject query) throws MongoException { return getCount(query, null); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject)} with null fields. * * @param query query to match * @return The count * @throws MongoException If an error occurred */ public long getCount(T query) throws MongoException { return getCount(query, null); }
/** * returns the number of documents that match a query. * * @param query query to match * @return The count * @throws MongoException If an error occurred */ public long count(DBObject query) throws MongoException { return getCount(query, null); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long)} with limit=0 and skip=0 * * @param query query to match * @param fields fields to return * @return The count * @throws MongoException If an error occurred */ public long getCount(DBObject query, DBObject fields) throws MongoException { return getCount(query, fields, 0, 0); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject)} with null fields. * * @param query query to match * @return The count * @throws MongoException If an error occurred */ public long getCount(T query) throws MongoException { return getCount(query, null); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject)} with null fields. * * @param query query to match * @return The count * @throws MongoException If an error occurred */ public long getCount(DBObject query) throws MongoException { return getCount(query, null); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long)} with limit=0 and skip=0 * * @param query query to match * @param fields fields to return * @return The count * @throws MongoException If an error occurred */ public long getCount(DBObject query, DBObject fields) throws MongoException { return getCount(query, fields, 0, 0); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long)} with limit=0 and skip=0 * * @param query query to match * @param fields fields to return * @return The count * @throws MongoException If an error occurred */ public long getCount(T query, T fields) throws MongoException { return getCount(query, fields, 0, 0); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject)} with an empty query and null fields. * * @return number of documents that match query * @throws MongoException If an error occurred */ public long getCount() throws MongoException { return getCount(new BasicDBObject(), null); }
/** * returns the number of documents in this collection. * * @return The count * @throws MongoException If an error occurred */ public long count() throws MongoException { return getCount(new BasicDBObject(), null); }
/** * calls {@link DBCollection#getCount(com.mongodb.DBObject, com.mongodb.DBObject)} with an empty query and null fields. * * @return number of documents that match query * @throws MongoException If an error occurred */ public long getCount() throws MongoException { return getCount(new BasicDBObject(), null); }
/** * returns the number of documents in this collection. * * @return The count * @throws MongoException If an error occurred */ public long count() throws MongoException { return getCount(new BasicDBObject(), null); }