Example usage for com.mongodb DBCollection count

List of usage examples for com.mongodb DBCollection count

Introduction

In this page you can find the example usage for com.mongodb DBCollection count.

Prototype

public long count() 

Source Link

Document

Same as #getCount()

Usage

From source file:uk.ac.ebi.eva.test.utils.DropStudyJobTestUtils.java

License:Apache License

public static void assertDropFiles(DBCollection filesCollection, String studyId,
        long expectedFilesAfterDropStudy) {
    assertEquals(expectedFilesAfterDropStudy, filesCollection.count());

    BasicDBObject remainingFilesThatShouldHaveBeenDropped = new BasicDBObject(STUDYID_FIELD, studyId);
    assertEquals(0, filesCollection.count(remainingFilesThatShouldHaveBeenDropped));
}