Class MapEntrySetStore.SetIterator

  • All Implemented Interfaces:
    java.util.Iterator
    Enclosing class:
    MapEntrySetStore<K,​V>

    public abstract static class MapEntrySetStore.SetIterator
    extends java.lang.Object
    implements java.util.Iterator
    Inner class representing an iterator for the Set. TODO Provide an option where a PersistentClassROF is provided for key and/or value so we can load fetch plan fields rather than just id.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Iterator delegate  
      private java.util.Map.Entry lastElement  
      private MapEntrySetStore setStore  
      private org.datanucleus.state.DNStateManager sm  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SetIterator​(org.datanucleus.state.DNStateManager sm, MapEntrySetStore setStore, org.datanucleus.metadata.AbstractMemberMetaData ownerMmd, java.sql.ResultSet rs, int[] keyResultCols, int[] valueResultCols)
      Constructor for iterating the Set of entries.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      java.lang.Object next()  
      protected abstract boolean next​(java.lang.Object rs)  
      void remove()  
      • 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
    • Field Detail

      • sm

        private final org.datanucleus.state.DNStateManager sm
      • delegate

        private final java.util.Iterator delegate
      • lastElement

        private java.util.Map.Entry lastElement
    • Constructor Detail

      • SetIterator

        protected SetIterator​(org.datanucleus.state.DNStateManager sm,
                              MapEntrySetStore setStore,
                              org.datanucleus.metadata.AbstractMemberMetaData ownerMmd,
                              java.sql.ResultSet rs,
                              int[] keyResultCols,
                              int[] valueResultCols)
        Constructor for iterating the Set of entries.
        Parameters:
        sm - StateManager
        setStore - the set store
        ownerMmd - the owner member meta data - can be null (for non-joinTable cases)
        rs - the ResultSet
        keyResultCols - Column(s) for the key id
        valueResultCols - Column(s) for the value id
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator
      • next

        public java.lang.Object next()
        Specified by:
        next in interface java.util.Iterator
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator
      • next

        protected abstract boolean next​(java.lang.Object rs)