Class MorphiaIterator<T,​V>

  • Type Parameters:
    T - the original type being iterated
    V - 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 by MongoCursor
    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.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • 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 reference
        it - the Iterator to use
        mapper - the Mapper to use
        clazz - the original type being iterated
        collection - the mongodb collection
        cache - 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 interface java.util.Iterator<T>
      • next

        public V next()
        Deprecated.
        Specified by:
        next in interface java.util.Iterator<T>
      • remove

        public void remove()
        Deprecated.
        Specified by:
        remove in interface java.util.Iterator<T>
      • iterator

        public java.util.Iterator<V> iterator()
        Deprecated.
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • convertItem

        protected V convertItem​(com.mongodb.DBObject dbObj)
        Deprecated.
      • getNext

        protected com.mongodb.DBObject getNext()
        Deprecated.