Class Query
java.lang.Object
org.gcube.accounting.utility.postgresql.PostgreSQLQuery
org.gcube.accounting.analytics.persistence.postgresql.Query
public class Query
extends org.gcube.accounting.utility.postgresql.PostgreSQLQuery
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Map<String,Collection<String>> static final Stringprotected org.gcube.accounting.analytics.TemporalConstraintFields inherited from class org.gcube.accounting.utility.postgresql.PostgreSQLQuery
DATETIME_PATTERN, DEFAULT_TIME_ZONE, logger, stringBuffer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContext(String context) protected voidprotected voidaddDateGroupBy(boolean addNested) protected voidaddDateOrderBy(boolean addNested) protected voidaddEmittedFields(boolean addNested) protected voidprotected voidprotected voidaddLimit()protected voidaddOrConditions(String key, Collection<String> values) protected voidprotected voidprotected voidprotected voidappendTableField(String fieldName) static StringgetFormattedDate(Calendar calendar) org.gcube.accounting.utility.postgresql.RecordToDBFieldsprotected StringgetTableField(String fieldName) protected StringgetTimeBucketCalendarInterval(org.gcube.accounting.analytics.TemporalConstraint.AggregationMode aggregationMode) voidsetContexts(Set<String> contexts) voidsetFilters(Collection<? extends org.gcube.accounting.analytics.Filter> filters) voidvoidsetOrderByField(String orderByField) voidsetRecordId(String recordId) voidsetTableFieldToRequest(String tableFieldToRequest) voidsetTemporalConstraint(org.gcube.accounting.analytics.TemporalConstraint temporalConstraint) Methods inherited from class org.gcube.accounting.utility.postgresql.PostgreSQLQuery
appendString, appendValue, getQuotedString, getSQLInsertCommand, getValue
-
Field Details
-
DATE_OF_TIMESERIES_AS_FIELD
- See Also:
-
NESTED_TABLE_NAME
- See Also:
-
temporalConstraint
protected org.gcube.accounting.analytics.TemporalConstraint temporalConstraint -
filters
-
contexts
-
-
Constructor Details
-
Method Details
-
getRequestedTableField
-
setTemporalConstraint
public void setTemporalConstraint(org.gcube.accounting.analytics.TemporalConstraint temporalConstraint) -
setFilters
-
setContexts
-
setTableFieldToRequest
-
setOrderByField
-
setLimit
-
addContext
-
setRecordId
-
getRecordToDBFields
public org.gcube.accounting.utility.postgresql.RecordToDBFields getRecordToDBFields() -
getTableField
-
appendTableField
-
getFormattedDate
-
addFilters
- Throws:
SQLException
-
addOrConditions
- Throws:
SQLException
-
addContextFilter
- Throws:
SQLException
-
addEmittedFields
- Throws:
Exception
-
getTimeBucketCalendarInterval
protected String getTimeBucketCalendarInterval(org.gcube.accounting.analytics.TemporalConstraint.AggregationMode aggregationMode) -
addTemporalConstraintToQuery
- Throws:
SQLException
-
addDateGroupBy
protected void addDateGroupBy(boolean addNested) -
addDateOrderBy
protected void addDateOrderBy(boolean addNested) -
addGroupAndOrderByForOrderByField
protected void addGroupAndOrderByForOrderByField() -
addLimit
protected void addLimit() -
addRequestedField
protected void addRequestedField() -
addRequestedDate
protected void addRequestedDate() -
getTimeSeriesQuery
- Throws:
Exception
-
getNextPossibleValueQuery
- Throws:
Exception
-
getRecordQuery
-
getDinstinctValuesQuery
-