public class AccountingPersistenceQuery extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection to persistence
|
protected static AccountingPersistenceQuery |
getInstance() |
Set<String> |
getKeys(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass)
Return the list of key valid for queries a certain usage record type
|
Set<String> |
getPossibleValuesForKey(Class<? extends org.gcube.documentstore.records.AggregatedRecord> usageRecordType,
String key)
Return the list of possible values for a key for a certain usage record type
|
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 static AccountingPersistenceQuery getInstance()
public 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 Set<String> getKeys(Class<? extends org.gcube.documentstore.records.AggregatedRecord> recordClass) throws Exception
recordClass - the usage record typeException - if failspublic Set<String> getPossibleValuesForKey(Class<? extends org.gcube.documentstore.records.AggregatedRecord> usageRecordType, String key) throws Exception
usageRecordType - the usage record typekey - the keyException - if failsCopyright © 2016. All Rights Reserved.