Class SimpleDbQueryLoggerImpl.SimpleDbRecordsImpl

  • All Implemented Interfaces:
    java.util.Iterator<org.refcodes.tabular.Record<? extends T>>, org.refcodes.tabular.Records<T>
    Enclosing class:
    SimpleDbQueryLoggerImpl<T>

    protected class SimpleDbQueryLoggerImpl.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.util.Iterator

        forEachRemaining
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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<org.refcodes.tabular.Record<? extends T>>
      • nextItem

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

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

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<org.refcodes.tabular.Record<? extends T>>