Package org.mongojack

Class DBCursor<T>

java.lang.Object
org.mongojack.DBCursor<T>
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<T>, Iterator<T>

@NotThreadSafe @Deprecated public class DBCursor<T> extends Object implements Closeable, Iterator<T>, Iterable<T>
Deprecated.
use MongoCollections as an entrypoint for interacting with MongoDB.
Compatibility layer to support existing code interacting with the Mongojack 2.x API.
  • Constructor Details

    • DBCursor

      public DBCursor(org.mongojack.JacksonMongoCollection<T> collection, org.bson.conversions.Bson filter, Supplier<com.mongodb.client.FindIterable<T>> findIterableSupplier)
      Deprecated.
  • Method Details

    • sort

      public DBCursor<T> sort(org.bson.conversions.Bson sort)
      Deprecated.
    • limit

      public DBCursor<T> limit(int limit)
      Deprecated.
    • skip

      public DBCursor<T> skip(int skip)
      Deprecated.
    • close

      public void close()
      Deprecated.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • toArray

      public List<T> toArray()
      Deprecated.
    • hasNext

      public boolean hasNext()
      Deprecated.
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Deprecated.
      Specified by:
      next in interface Iterator<T>
    • count

      public int count()
      Deprecated.
    • iterator

      @Nonnull public Iterator<T> iterator()
      Deprecated.
      Specified by:
      iterator in interface Iterable<T>
    • explain

      public org.bson.Document explain()
      Deprecated.