T - The type of the Record instances managed by the
Logger.public class SimpleDbQueryLoggerImpl<T> extends SimpleDbLoggerImpl<T> implements org.refcodes.logger.QueryLogger<T>, org.refcodes.component.Component, org.refcodes.component.Initializable, org.refcodes.component.Decomposeable, org.refcodes.component.Flushable
SimpleDbQueryLoggerImpl extends the SimpleDbLoggerImpl
implementation with the QueryLogger functionality.| Modifier and Type | Class and Description |
|---|---|
protected class |
SimpleDbQueryLoggerImpl.SimpleDbRecordsImpl
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:
-------------------------------------------------------------------------
|
org.refcodes.component.Destroyable.DestroyAutomatonorg.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializableLOGGER| Constructor and Description |
|---|
SimpleDbQueryLoggerImpl(String aDomainName,
String aAccessKey,
String aSecretKey,
org.refcodes.tabular.ColumnFactory<T> aColumnFactory)
Constructs the
SimpleDbQueryLoggerImpl for a given SimpleDB
domain. |
SimpleDbQueryLoggerImpl(String aDomainName,
String aAccessKey,
String aSecretKey,
String aEndPoint,
org.refcodes.tabular.ColumnFactory<T> aColumnFactory)
Constructs the
SimpleDbQueryLoggerImpl for a given SimpleDB
domain. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
org.refcodes.tabular.Records<T> |
findLogs() |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria) |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria,
org.refcodes.tabular.Header<T> aHeader) |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria,
org.refcodes.tabular.Header<T> aHeader,
int aLimit) |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.criteria.Criteria aCriteria,
int aLimit) |
org.refcodes.tabular.Records<T> |
findLogs(org.refcodes.tabular.Header<T> aHeader,
int aLimit) |
org.refcodes.tabular.Records<T> |
findLogs(int aLimit) |
protected String |
toSqlQuery(org.refcodes.criteria.Criteria aCriteria,
int aLimit)
Creates an SQL SELECT query from the given
Criteria and the
provided limit. |
addHeaderColumn, decompose, flush, flushBuffer, getHeader, initialize, logclearDomain, getAmazonSimpleDbClient, getAmazonSimpleDbClient, getAmazonSimpleDbDomainName, getDomainNames, hasDomain, isRequestTimeoutException, isServiceUnavailableException, setAmazonSimpleDbDomainName, toMessagepublic SimpleDbQueryLoggerImpl(String aDomainName, String aAccessKey, String aSecretKey, org.refcodes.tabular.ColumnFactory<T> aColumnFactory)
SimpleDbQueryLoggerImpl for a given SimpleDB
domain.aDomainName - The name for the Amazon SimpleDB domainaAccessKey - The Amazon access key for Amazon SimpleDBaSecretKey - The Amazon secret key for Amazon SimpleDBaColumnFactory - The ColumnFactory to create default
Column instances for Record instances to be
processedUnknownDomainAliasException - in case the campaigning domain alias
cannot be resolved.public SimpleDbQueryLoggerImpl(String aDomainName, String aAccessKey, String aSecretKey, String aEndPoint, org.refcodes.tabular.ColumnFactory<T> aColumnFactory)
SimpleDbQueryLoggerImpl for a given SimpleDB
domain.aDomainName - The name for the Amazon SimpleDB domainaAccessKey - The Amazon access key for Amazon SimpleDBaSecretKey - The Amazon secret key for Amazon SimpleDBaEndPoint - The end-point (Amazon region) to use (see
AbstractSimpleDbClient's constructor documentation for
possible values).aColumnFactory - The ColumnFactory to create default
Column instances for Record instances to be
processedpublic org.refcodes.tabular.Records<T> findLogs()
findLogs in interface org.refcodes.logger.QueryLogger<T>public org.refcodes.tabular.Records<T> findLogs(int aLimit)
findLogs in interface org.refcodes.logger.QueryLogger<T>public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria)
findLogs in interface org.refcodes.logger.QueryLogger<T>public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, int aLimit)
findLogs in interface org.refcodes.logger.QueryLogger<T>public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, org.refcodes.tabular.Header<T> aHeader)
findLogs in interface org.refcodes.logger.QueryLogger<T>public org.refcodes.tabular.Records<T> findLogs(org.refcodes.tabular.Header<T> aHeader, int aLimit)
findLogs in interface org.refcodes.logger.QueryLogger<T>public org.refcodes.tabular.Records<T> findLogs(org.refcodes.criteria.Criteria aCriteria, org.refcodes.tabular.Header<T> aHeader, int aLimit)
findLogs in interface org.refcodes.logger.QueryLogger<T>public void destroy()
destroy in interface org.refcodes.component.Destroyabledestroy in class SimpleDbLoggerImpl<T>protected String toSqlQuery(org.refcodes.criteria.Criteria aCriteria, int aLimit)
Criteria and the
provided limit.aCriteria - The Criteria from which to create the SQL query.aLimit - The limit to be applied to the result set of the query.Copyright © 2016. All rights reserved.