Class SimpleDbQueryLogger.SimpleDbRecordsImpl

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


    protected class SimpleDbQueryLogger.SimpleDbRecordsImpl
    extends 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 Detail

      • SimpleDbRecordsImpl

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

        public SimpleDbRecordsImpl​(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 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 Iterator<T>
      • remove

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