Skip to content

Commit fabab8f

Browse files
committed
style: update methods order
Signed-off-by: Otavio Santana <[email protected]>
1 parent b6c44d7 commit fabab8f

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

jnosql-mongodb/src/main/java/org/eclipse/jnosql/databases/mongodb/communication/MongoDBDocumentManager.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ public Stream<DocumentEntity> select(DocumentQuery query) {
167167

168168
}
169169

170+
@Override
171+
public long count(String documentCollection) {
172+
Objects.requireNonNull(documentCollection, "documentCollection is required");
173+
MongoCollection<Document> collection = mongoDatabase.getCollection(documentCollection);
174+
return collection.countDocuments();
175+
}
176+
177+
@Override
178+
public void close() {
179+
180+
}
181+
170182
/**
171183
* Removes all documents from the collection that match the given query filter.
172184
* If no documents match, the collection is not modified.
@@ -218,23 +230,8 @@ public Stream<DocumentEntity> select(String collectionName, Bson filter) {
218230
return stream(documents.spliterator(), false).map(MongoDBUtils::of)
219231
.map(ds -> DocumentEntity.of(collectionName, ds));
220232
}
221-
222-
223-
@Override
224-
public long count(String documentCollection) {
225-
Objects.requireNonNull(documentCollection, "documentCollection is required");
226-
MongoCollection<Document> collection = mongoDatabase.getCollection(documentCollection);
227-
return collection.countDocuments();
228-
}
229-
230233
private Bson getSort(Sort sort) {
231234
return sort.isAscending() ? Sorts.ascending(sort.property()) : Sorts.descending(sort.property());
232235
}
233236

234-
@Override
235-
public void close() {
236-
237-
}
238-
239-
240237
}

0 commit comments

Comments
 (0)