public class AccountingPersistenceQueryPostgreSQL extends Object implements org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQuery
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> |
clz |
protected org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration |
configuration |
protected Set<String> |
contexts |
static int |
DEFAULT_TOP_LIMIT |
protected Collection<org.gcube.accounting.analytics.Filter> |
filters |
protected static org.slf4j.Logger |
logger |
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected org.gcube.accounting.analytics.TemporalConstraint |
temporalConstraint |
static String |
URL_PROPERTY_KEY |
| Constructor and Description |
|---|
AccountingPersistenceQueryPostgreSQL() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProperty(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode objectNode,
String key,
Object value) |
void |
close() |
protected Calendar |
getCalendar(java.time.OffsetDateTime offsetDateTime) |
protected Connection |
getConnection(Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> clz) |
SortedMap<org.gcube.accounting.analytics.Filter,SortedMap<Calendar,org.gcube.accounting.analytics.Info>> |
getContextTimeSeries() |
SortedSet<org.gcube.accounting.analytics.NumberedFilter> |
getFilterValues(String key) |
SortedSet<org.gcube.accounting.analytics.NumberedFilter> |
getFilterValues(String key,
Integer limit) |
protected SortedSet<org.gcube.accounting.analytics.NumberedFilter> |
getNumberedValues(String key,
String orderingProperty,
Integer limit) |
org.gcube.documentstore.records.Record |
getRecord(String recordId,
String type) |
SortedMap<org.gcube.accounting.analytics.Filter,SortedMap<Calendar,org.gcube.accounting.analytics.Info>> |
getSpaceTimeSeries(Set<String> dataTypes) |
SortedMap<Calendar,org.gcube.accounting.analytics.Info> |
getTimeSeries() |
protected SortedMap<Calendar,org.gcube.accounting.analytics.Info> |
getTimeSeries(Set<String> contexts) |
SortedMap<org.gcube.accounting.analytics.NumberedFilter,SortedMap<Calendar,org.gcube.accounting.analytics.Info>> |
getTopValues(String topKey,
String orderingProperty,
Integer limit) |
List<org.gcube.accounting.analytics.UsageValue> |
getUsageValueQuotaTotal(List<org.gcube.accounting.analytics.UsageValue> listUsage) |
boolean |
isConnectionActive() |
void |
prepareConnection(org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration configuration) |
void |
setContexts(Set<String> contexts) |
void |
setFilters(Collection<? extends org.gcube.accounting.analytics.Filter> filters) |
void |
setRequestedRecords(Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> clz) |
void |
setTemporalConstraint(org.gcube.accounting.analytics.TemporalConstraint temporalConstraint) |
protected static final org.slf4j.Logger logger
public static final String URL_PROPERTY_KEY
public static final int DEFAULT_TOP_LIMIT
protected org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration configuration
protected org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> clz
protected org.gcube.accounting.analytics.TemporalConstraint temporalConstraint
protected Collection<org.gcube.accounting.analytics.Filter> filters
public AccountingPersistenceQueryPostgreSQL()
public void setRequestedRecords(Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> clz)
setRequestedRecords in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQuerypublic void setTemporalConstraint(org.gcube.accounting.analytics.TemporalConstraint temporalConstraint)
setTemporalConstraint in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQuerypublic void setContexts(Set<String> contexts)
setContexts in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQuerypublic void setFilters(Collection<? extends org.gcube.accounting.analytics.Filter> filters)
setFilters in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryprotected Connection getConnection(Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> clz) throws Exception
Exceptionpublic void prepareConnection(org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryConfiguration configuration)
throws Exception
prepareConnection in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionprotected void addProperty(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode objectNode,
String key,
Object value)
protected SortedMap<Calendar,org.gcube.accounting.analytics.Info> getTimeSeries(Set<String> contexts) throws Exception
Exceptionpublic SortedMap<Calendar,org.gcube.accounting.analytics.Info> getTimeSeries() throws Exception
getTimeSeries in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionprotected Calendar getCalendar(java.time.OffsetDateTime offsetDateTime)
public SortedMap<org.gcube.accounting.analytics.Filter,SortedMap<Calendar,org.gcube.accounting.analytics.Info>> getContextTimeSeries() throws Exception
getContextTimeSeries in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionprotected SortedSet<org.gcube.accounting.analytics.NumberedFilter> getNumberedValues(String key, String orderingProperty, Integer limit) throws Exception
Exceptionpublic SortedSet<org.gcube.accounting.analytics.NumberedFilter> getFilterValues(String key) throws Exception
getFilterValues in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic SortedSet<org.gcube.accounting.analytics.NumberedFilter> getFilterValues(String key, Integer limit) throws Exception
getFilterValues in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic SortedMap<org.gcube.accounting.analytics.NumberedFilter,SortedMap<Calendar,org.gcube.accounting.analytics.Info>> getTopValues(String topKey, String orderingProperty, Integer limit) throws Exception
getTopValues in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic org.gcube.documentstore.records.Record getRecord(String recordId, String type) throws Exception
getRecord in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic SortedMap<org.gcube.accounting.analytics.Filter,SortedMap<Calendar,org.gcube.accounting.analytics.Info>> getSpaceTimeSeries(Set<String> dataTypes) throws Exception
getSpaceTimeSeries in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic List<org.gcube.accounting.analytics.UsageValue> getUsageValueQuotaTotal(List<org.gcube.accounting.analytics.UsageValue> listUsage) throws Exception
getUsageValueQuotaTotal in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionpublic void close()
throws Exception
close in interface org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQueryExceptionCopyright © 2021. All Rights Reserved.