Package dev.morphia.query.internal
Class MorphiaKeyCursor<T>
- java.lang.Object
-
- dev.morphia.query.internal.MorphiaKeyCursor<T>
-
- Type Parameters:
T
- the entity type
- All Implemented Interfaces:
com.mongodb.client.MongoCursor<Key<T>>
,Closeable
,AutoCloseable
,Iterator<Key<T>>
@Deprecated(since="2.0", forRemoval=true) public class MorphiaKeyCursor<T> extends Object implements com.mongodb.client.MongoCursor<Key<T>>
Deprecated, for removal: This API element is subject to removal in a future version.Defines an Iterator across the Key values for a given type.
-
-
Constructor Summary
Constructors Constructor Description MorphiaKeyCursor(com.mongodb.client.MongoCursor<org.bson.Document> cursor, Mapper mapper, Class<T> clazz, String collection)
Deprecated, for removal: This API element is subject to removal in a future version.Create
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated, for removal: This API element is subject to removal in a future version.Closes the underlying cursor.com.mongodb.ServerAddress
getServerAddress()
Deprecated, for removal: This API element is subject to removal in a future version.com.mongodb.ServerCursor
getServerCursor()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
hasNext()
Deprecated, for removal: This API element is subject to removal in a future version.Key<T>
next()
Deprecated, for removal: This API element is subject to removal in a future version.void
remove()
Deprecated, for removal: This API element is subject to removal in a future version.List<Key<T>>
toList()
Deprecated, for removal: This API element is subject to removal in a future version.Converts this cursor to a List.Key<T>
tryNext()
Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
MorphiaKeyCursor
public MorphiaKeyCursor(com.mongodb.client.MongoCursor<org.bson.Document> cursor, Mapper mapper, Class<T> clazz, String collection)
Deprecated, for removal: This API element is subject to removal in a future version.Create- Parameters:
cursor
- the cursor to usemapper
- the Mapper to useclazz
- the original type being iteratedcollection
- the mongodb collection
-
-
Method Detail
-
close
public void close()
Deprecated, for removal: This API element is subject to removal in a future version.Closes the underlying cursor.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacecom.mongodb.client.MongoCursor<T>
-
hasNext
public boolean hasNext()
Deprecated, for removal: This API element is subject to removal in a future version.
-
next
@NonNull public Key<T> next()
Deprecated, for removal: This API element is subject to removal in a future version.
-
tryNext
public Key<T> tryNext()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
tryNext
in interfacecom.mongodb.client.MongoCursor<T>
-
getServerCursor
public com.mongodb.ServerCursor getServerCursor()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getServerCursor
in interfacecom.mongodb.client.MongoCursor<T>
-
getServerAddress
@NonNull public com.mongodb.ServerAddress getServerAddress()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getServerAddress
in interfacecom.mongodb.client.MongoCursor<T>
-
toList
public List<Key<T>> toList()
Deprecated, for removal: This API element is subject to removal in a future version.Converts this cursor to a List. Care should be taken on large datasets as OutOfMemoryErrors are a risk.- Returns:
- the list of Entities
-
-