Class SimpleDbQueryLogger.SimpleDbRecordsImpl

  • All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.Iterator<T>, org.refcodes.tabular.Records<T>
    Enclosing class:
    SimpleDbQueryLogger<T>


    protected class SimpleDbQueryLogger.SimpleDbRecordsImpl
    extends java.lang.Object
    implements org.refcodes.tabular.Records<T>
    This iterator encapsulates an Amazon select request for the business logic to simply iterate through the results. ------------------------------------------------------------------------- TODO Make this unit testable and create unit test: -------------------------------------------------------------------------
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleDbRecordsImpl​(java.lang.String aSelectQuery)
      Constructs a Records iterator from a SimpleDB query and the required Header.
      SimpleDbRecordsImpl​(java.lang.String aSelectQuery, org.refcodes.tabular.Header<T> aHeader)
      Constructs a Records iterator from a SimpleDB query and the required Header.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext​()
      org.refcodes.tabular.Record<T> next​()
      protected com.amazonaws.services.simpledb.model.Item nextItem​()
      "Raw" method to retrieve the next item from Simple DB.
      void remove​()
      • Methods inherited from interface java.lang.Iterable

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

        forEachRemaining
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.refcodes.tabular.Records

        iterator
    • Constructor Detail

      • SimpleDbRecordsImpl

        public SimpleDbRecordsImpl​(java.lang.String aSelectQuery)
        Constructs a Records iterator from a SimpleDB query and the required Header.
        Parameters:
        aSelectQuery - The query for retrieval.
      • SimpleDbRecordsImpl

        public SimpleDbRecordsImpl​(java.lang.String aSelectQuery,
                                   org.refcodes.tabular.Header<T> aHeader)
        Constructs a Records iterator from a SimpleDB query and the required Header.
        Parameters:
        aSelectQuery - The query for retrieval.
        aHeader - The expected Header in the result.
    • Method Detail

      • hasNext

        public boolean hasNext​()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • nextItem

        protected com.amazonaws.services.simpledb.model.Item nextItem​()
        "Raw" method to retrieve the next item from Simple DB. Needed for the SimpleDbTrimLogger.deleteLogs(Criteria) operation.
        Returns:
        the item
      • next

        public org.refcodes.tabular.Record<T> next​()
        Specified by:
        next in interface java.util.Iterator<T>
      • remove

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