Class PostgreSQLConnector
- java.lang.Object
-
- org.gcube.accounting.analytics.persistence.postgresql.AccountingPersistenceQueryPostgreSQL
-
- org.gcube.accounting.aggregator.persistence.PostgreSQLConnector
-
- All Implemented Interfaces:
org.gcube.accounting.analytics.persistence.AccountingPersistenceBackendQuery
public class PostgreSQLConnector extends org.gcube.accounting.analytics.persistence.postgresql.AccountingPersistenceQueryPostgreSQL- Author:
- Luca Frosini (ISTI-CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected Connectionconnectionstatic TimeZoneDEFAULT_TIME_ZONE
-
Method Summary
-
Methods inherited from class org.gcube.accounting.analytics.persistence.postgresql.AccountingPersistenceQueryPostgreSQL
close, getCalendar, getConnection, getContextTimeSeries, getFilterValues, getFilterValues, getNoContextTimeSeries, getNumberedValues, getRecord, getSpaceProvidersIds, getSpaceTimeSeries, getTimeSeries, getTimeSeries, getTopValues, getUsageValueQuotaTotal, isConnectionActive, prepareConnection
-
-
-
-
Field Detail
-
DEFAULT_TIME_ZONE
public static final TimeZone DEFAULT_TIME_ZONE
-
connection
protected Connection connection
-
-
Method Detail
-
getPostgreSQLConnector
public static PostgreSQLConnector getPostgreSQLConnector() throws Exception
- Throws:
Exception
-
getConnection
protected Connection getConnection() throws Exception
- Throws:
Exception
-
getQuotedString
protected String getQuotedString(String string) throws SQLException
- Throws:
SQLException
-
getValue
protected String getValue(Serializable serializable) throws SQLException
- Throws:
SQLException
-
getInsertAggregationStatusQuery
public String getInsertAggregationStatusQuery(AggregationStatus aggregationStatus, boolean upsert) throws SQLException
- Throws:
SQLException
-
getInsertAggregationStateQuery
public String getInsertAggregationStateQuery(AggregationStatus aggregationStatus) throws SQLException
- Throws:
SQLException
-
upsertAggregationStatus
public void upsertAggregationStatus(AggregationStatus aggregationStatus) throws Exception
- Throws:
Exception
-
getAggregationStatusFromResultSet
public AggregationStatus getAggregationStatusFromResultSet(ResultSet resultSet) throws Exception
- Throws:
Exception
-
getLast
public AggregationStatus getLast(String recordType, AggregationType aggregationType, Date aggregationStartDate, Date aggregationEndDate) throws Exception
- Throws:
Exception
-
getUnterminated
public List<AggregationStatus> getUnterminated(String recordType, AggregationType aggregationType, Date aggregationStartDate, Date aggregationEndDate, boolean forceRestart) throws Exception
- Throws:
Exception
-
getAll
public List<AggregationStatus> getAll() throws Exception
- Throws:
Exception
-
getAggregationStatus
public AggregationStatus getAggregationStatus(String recordType, AggregationType aggregationType, Date aggregationStartDate) throws Exception
- Throws:
Exception
-
deleteRecord
public void deleteRecord(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) throws Exception- Throws:
Exception
-
getResultSetOfRecordToBeAggregated
public ResultSet getResultSetOfRecordToBeAggregated(AggregationStatus aggregationStatus) throws Exception
- Throws:
Exception
-
-