Package dev.morphia.query
Class MorphiaIterator<T,V>
- java.lang.Object
-
- dev.morphia.query.MorphiaIterator<T,V>
-
- Type Parameters:
T
- the original type being iteratedV
- the type of the values returned
- All Implemented Interfaces:
java.lang.Iterable<V>
,java.util.Iterator<V>
- Direct Known Subclasses:
MorphiaKeyIterator
@Deprecated public class MorphiaIterator<T,V> extends java.lang.Object implements java.lang.Iterable<V>, java.util.Iterator<V>
Deprecated.this is being replaced byMongoCursor
- Author:
- Scott Hernandez
- See Also:
MorphiaKeyIterator
-
-
Constructor Summary
Constructors Constructor Description MorphiaIterator(Datastore datastore, java.util.Iterator<com.mongodb.DBObject> it, Mapper mapper, java.lang.Class<T> clazz, java.lang.String collection, EntityCache cache)
Deprecated.Creates a MorphiaIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Closes the underlying cursor.protected V
convertItem(com.mongodb.DBObject dbObj)
Deprecated.java.lang.Class<T>
getClazz()
Deprecated.java.lang.String
getCollection()
Deprecated.com.mongodb.DBCursor
getCursor()
Deprecated.long
getDriverTime()
Deprecated.Mapper
getMapper()
Deprecated.long
getMapperTime()
Deprecated.protected com.mongodb.DBObject
getNext()
Deprecated.boolean
hasNext()
Deprecated.java.util.Iterator<V>
iterator()
Deprecated.V
next()
Deprecated.void
remove()
Deprecated.
-
-
-
Constructor Detail
-
MorphiaIterator
public MorphiaIterator(Datastore datastore, java.util.Iterator<com.mongodb.DBObject> it, Mapper mapper, java.lang.Class<T> clazz, java.lang.String collection, EntityCache cache)
Deprecated.Creates a MorphiaIterator- Parameters:
datastore
- the Datastore to use when fetching this referenceit
- the Iterator to usemapper
- the Mapper to useclazz
- the original type being iteratedcollection
- the mongodb collectioncache
- the EntityCache
-
-
Method Detail
-
close
public void close()
Deprecated.Closes the underlying cursor.
-
getClazz
public java.lang.Class<T> getClazz()
Deprecated.- Returns:
- the original class type.
-
getCollection
public java.lang.String getCollection()
Deprecated.- Returns:
- the mongodb collection
-
getCursor
public com.mongodb.DBCursor getCursor()
Deprecated.- Returns:
- the underlying DBCursor
-
getDriverTime
public long getDriverTime()
Deprecated.- Returns:
- the time spent calling the driver in ms
-
getMapper
public Mapper getMapper()
Deprecated.- Returns:
- the Mapper being used
-
getMapperTime
public long getMapperTime()
Deprecated.- Returns:
- the time spent calling the mapper in ms
-
hasNext
public boolean hasNext()
Deprecated.- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
remove
public void remove()
Deprecated.- Specified by:
remove
in interfacejava.util.Iterator<T>
-
iterator
public java.util.Iterator<V> iterator()
Deprecated.- Specified by:
iterator
in interfacejava.lang.Iterable<T>
-
convertItem
protected V convertItem(com.mongodb.DBObject dbObj)
Deprecated.
-
getNext
protected com.mongodb.DBObject getNext()
Deprecated.
-
-