Class SimpleDbQueryLogger.SimpleDbRecords

java.lang.Object
org.refcodes.logger.alt.simpledb.SimpleDbQueryLogger.SimpleDbRecords
All Implemented Interfaces:
Iterable<org.refcodes.tabular.Record<T>>, Iterator<org.refcodes.tabular.Record<T>>, org.refcodes.tabular.Records<T>
Enclosing class:
SimpleDbQueryLogger<T>

protected class SimpleDbQueryLogger.SimpleDbRecords 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.
  • Constructor Details

    • SimpleDbRecords

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

      public SimpleDbRecords(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 Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<org.refcodes.tabular.Record<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<org.refcodes.tabular.Record<T>>
    • remove

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