public class AccountingPersistenceQueryCouchDB
extends org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQuery
| Modifier and Type | Field and Description |
|---|---|
protected org.ektorp.CouchDbConnector |
couchDbConnector |
protected org.ektorp.CouchDbInstance |
couchDbInstance |
protected static String |
DB_NAME |
protected static String |
KEYS_SEPARATOR
Used in the name of map reduce to seperate keys used as filter
|
protected static String |
MAP_REDUCE__DESIGN |
protected static String |
MAP_REDUCE_ALL |
protected static String |
VALUES |
protected static String |
VIEWS_KEY |
| Constructor and Description |
|---|
AccountingPersistenceQueryCouchDB() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected Calendar |
getCalendarFromArray(org.json.JSONArray array) |
protected String |
getDesignDocId(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType) |
Set<String> |
getKeys(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType) |
protected org.json.JSONObject |
getObjectByID(String id) |
Set<String> |
getPossibleValuesForKey(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType,
String key) |
protected org.codehaus.jackson.node.ArrayNode |
getRangeKey(org.codehaus.jackson.node.ArrayNode arrayNode,
long time,
org.gcube.accounting.analytics.TemporalConstraint.AggregationMode aggregationMode,
boolean wildCard) |
protected org.ektorp.http.HttpClient |
initHttpClient(URL url,
String username,
String password) |
protected void |
prepareConnection(org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration configuration) |
protected org.ektorp.ViewResult |
query(org.ektorp.ViewQuery query) |
protected Map<Calendar,org.gcube.accounting.analytics.Info> |
reallyQuery(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType,
org.gcube.accounting.analytics.TemporalConstraint temporalConstraint,
List<org.gcube.accounting.analytics.Filter> filters) |
protected org.ektorp.CouchDbInstance couchDbInstance
protected org.ektorp.CouchDbConnector couchDbConnector
protected static final String DB_NAME
protected static final String MAP_REDUCE__DESIGN
protected static final String MAP_REDUCE_ALL
protected static final String KEYS_SEPARATOR
protected static final String VIEWS_KEY
protected static final String VALUES
protected org.ektorp.http.HttpClient initHttpClient(URL url, String username, String password)
protected org.ektorp.ViewResult query(org.ektorp.ViewQuery query)
protected org.json.JSONObject getObjectByID(String id) throws Exception
Exceptionpublic void close()
throws Exception
close in class org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionprotected void prepareConnection(org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration configuration)
throws Exception
prepareConnection in class org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionprotected Calendar getCalendarFromArray(org.json.JSONArray array) throws org.json.JSONException
org.json.JSONExceptionprotected org.codehaus.jackson.node.ArrayNode getRangeKey(org.codehaus.jackson.node.ArrayNode arrayNode,
long time,
org.gcube.accounting.analytics.TemporalConstraint.AggregationMode aggregationMode,
boolean wildCard)
throws org.json.JSONException
org.json.JSONExceptionprotected String getDesignDocId(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType) throws InstantiationException, IllegalAccessException
protected Map<Calendar,org.gcube.accounting.analytics.Info> reallyQuery(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType, org.gcube.accounting.analytics.TemporalConstraint temporalConstraint, List<org.gcube.accounting.analytics.Filter> filters) throws Exception
reallyQuery in class org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic Set<String> getKeys(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType) throws Exception
getKeys in class org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic Set<String> getPossibleValuesForKey(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType, String key) throws Exception
getPossibleValuesForKey in class org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionCopyright © 2015. All Rights Reserved.