public abstract class AccountingPersistenceBackendQuery extends Object
| Constructor and Description |
|---|
AccountingPersistenceBackendQuery() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Close the connection to persistence
|
abstract Set<String> |
getKeys(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType)
Return the list of key valid for queries a certain usage record type
|
abstract Set<String> |
getPossibleValuesForKey(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType,
String key)
Return the list of possible values for a key for a certain usage record type
|
protected abstract void |
prepareConnection(AccountingPersistenceBackendQueryConfiguration configuration) |
Map<Calendar,Info> |
query(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType,
TemporalConstraint temporalConstraint,
List<Filter> filters)
Query the persistence obtaining a Map where the date is the key and
the #Info is the value.
|
protected abstract Map<Calendar,Info> |
reallyQuery(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType,
TemporalConstraint temporalConstraint,
List<Filter> filters) |
protected abstract void prepareConnection(AccountingPersistenceBackendQueryConfiguration configuration) throws Exception
Exceptionprotected abstract Map<Calendar,Info> reallyQuery(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType, TemporalConstraint temporalConstraint, List<Filter> filters) throws Exception
Exceptionpublic Map<Calendar,Info> query(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType, TemporalConstraint temporalConstraint, List<Filter> filters) throws Exception
usageRecordType - the Usage Record Type of interesttemporalConstraint - the TemporalConstraint (interval and aggregation)filters - the filter for the query. If null or empty string get all
data. The filters are evaluated in the order the are presented and are
considered in ANDException - if failspublic abstract Set<String> getKeys(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType) throws Exception
usageRecordType - the usage record typeException - if failspublic abstract Set<String> getPossibleValuesForKey(Class<? extends org.gcube.accounting.datamodel.AggregatedUsageRecord> usageRecordType, String key) throws Exception
usageRecordType - the usage record typekey - the keyException - if failsCopyright © 2015. All Rights Reserved.