public abstract class AccountingPersistenceBackendQuery extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_VALUES_LIMIT |
| 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.documentstore.records.AggregatedRecord> recordClass)
Return the list of key valid for queries a certain usage record type
|
abstract Set<String> |
getPossibleValuesForKey(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass,
String key)
Return the list of possible values for a key for a certain usage record
type.
|
abstract Set<String> |
getPossibleValuesForKey(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass,
String key,
int limit)
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.documentstore.records.AggregatedRecord> recordClass,
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.documentstore.records.AggregatedRecord> usageRecordType,
TemporalConstraint temporalConstraint,
List<Filter> filters) |
public static final int KEY_VALUES_LIMIT
protected abstract void prepareConnection(AccountingPersistenceBackendQueryConfiguration configuration) throws Exception
Exceptionprotected abstract Map<Calendar,Info> reallyQuery(Class<? extends org.gcube.documentstore.records.AggregatedRecord> usageRecordType, TemporalConstraint temporalConstraint, List<Filter> filters) throws Exception
Exceptionpublic Map<Calendar,Info> query(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass, TemporalConstraint temporalConstraint, List<Filter> filters) throws Exception
recordClass - 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.documentstore.records.AggregatedRecord> recordClass) throws Exception
recordClass - the usage record classException - if failspublic abstract Set<String> getPossibleValuesForKey(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass, String key) throws Exception
KEY_VALUES_LIMIT value.
If you want a different limit please use the
getPossibleValuesForKey(Class, String, int) function.
Invoking this function has the same effect of invoking
getPossibleValuesForKey(Class, String, int) function passing
KEY_VALUES_LIMIT has third argument.recordClass - the usage record typekey - the keyException - if failspublic abstract Set<String> getPossibleValuesForKey(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass, String key, int limit) throws Exception
recordClass - the usage record typekey - the keylimit - limit of result to return.Exception - if failsCopyright © 2016. All Rights Reserved.