Package org.refcodes.logger.alt.simpledb
Class SimpleDbQueryLoggerImpl.SimpleDbRecordsImpl
- java.lang.Object
-
- org.refcodes.logger.alt.simpledb.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 aRecords
iterator from a SimpleDB query and the requiredHeader
.SimpleDbRecordsImpl(java.lang.String aSelectQuery, org.refcodes.tabular.Header<T> aHeader)
Constructs aRecords
iterator from a SimpleDB query and the requiredHeader
.
-
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()
-
-
-
Constructor Detail
-
SimpleDbRecordsImpl
public SimpleDbRecordsImpl(java.lang.String aSelectQuery)
Constructs aRecords
iterator from a SimpleDB query and the requiredHeader
.- Parameters:
aSelectQuery
- The query for retrieval.
-
SimpleDbRecordsImpl
public SimpleDbRecordsImpl(java.lang.String aSelectQuery, org.refcodes.tabular.Header<T> aHeader)
Constructs aRecords
iterator from a SimpleDB query and the requiredHeader
.- Parameters:
aSelectQuery
- The query for retrieval.aHeader
- The expectedHeader
in the result.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.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 theSimpleDbTrimLoggerImpl.deleteLogs(Criteria)
operation.- Returns:
- the item
-
next
public org.refcodes.tabular.Record<T> next()
- Specified by:
next
in interfacejava.util.Iterator<org.refcodes.tabular.Record<? extends T>>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<org.refcodes.tabular.Record<? extends T>>
-
-