From e9eed9f88916a8f4d2f82fef454e075775299722 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 14 Feb 2024 18:18:05 +0100 Subject: [PATCH] Fixing code --- .../aggregator/persistence/PostgreSQLConnector.java | 3 +-- .../aggregator/persistence/PostgreSQLConnectorDst.java | 5 +---- .../aggregator/persistence/PostgreSQLConnectorSrc.java | 5 +---- .../aggregator/persistence/PostgreSQLConnectorStatusDst.java | 4 +--- .../aggregator/persistence/PostgreSQLConnectorStatusSrc.java | 4 +--- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnector.java b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnector.java index f977f77..50fabe1 100644 --- a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnector.java +++ b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnector.java @@ -23,7 +23,6 @@ import org.gcube.accounting.aggregator.status.AggregationStateEvent; import org.gcube.accounting.aggregator.status.AggregationStatus; import org.gcube.accounting.aggregator.utility.Constant; import org.gcube.accounting.aggregator.utility.Utility; -import org.gcube.accounting.analytics.persistence.postgresql.AccountingPersistenceQueryPostgreSQL; import org.gcube.accounting.datamodel.AggregatedUsageRecord; import org.gcube.accounting.persistence.AccountingPersistenceConfiguration; import org.gcube.accounting.utility.postgresql.RecordToDBFields; @@ -64,7 +63,7 @@ public class PostgreSQLConnector extends PersistencePostgreSQL implements Aggreg protected Connection getConnection() throws Exception { if(connection==null || connection.isClosed()) { - String url = configuration.getProperty(AccountingPersistenceQueryPostgreSQL.URL_PROPERTY_KEY); + String url = configuration.getProperty(AccountingPersistenceConfiguration.URL_PROPERTY_KEY); if(connection!=null && connection.isClosed()) { logger.warn("The connection was closed. We should investigate why. Going to reconnect to {}.", url); diff --git a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorDst.java b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorDst.java index 7e8ee4d..93ee61c 100644 --- a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorDst.java +++ b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorDst.java @@ -1,15 +1,12 @@ package org.gcube.accounting.aggregator.persistence; -import org.gcube.documentstore.persistence.PersistencePostgreSQL; - /** * @author Luca Frosini (ISTI-CNR) */ public class PostgreSQLConnectorDst extends PostgreSQLConnector implements AggregatorPersistenceDst { protected PostgreSQLConnectorDst() throws Exception { -// super(PostgreSQLConnectorDst.class); - super(PersistencePostgreSQL.class); + super(AggregatorPersistenceDst.class); } } diff --git a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorSrc.java b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorSrc.java index d8e6e24..bb4c902 100644 --- a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorSrc.java +++ b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorSrc.java @@ -1,15 +1,12 @@ package org.gcube.accounting.aggregator.persistence; -import org.gcube.accounting.analytics.persistence.postgresql.AccountingPersistenceQueryPostgreSQL; - /** * @author Luca Frosini (ISTI-CNR) */ public class PostgreSQLConnectorSrc extends PostgreSQLConnector implements AggregatorPersistenceSrc { protected PostgreSQLConnectorSrc() throws Exception { -// super(PostgreSQLConnectorSrc.class); - super(AccountingPersistenceQueryPostgreSQL.class); + super(AggregatorPersistenceSrc.class); } } diff --git a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusDst.java b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusDst.java index 1201ae5..0b24cd7 100644 --- a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusDst.java +++ b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusDst.java @@ -1,14 +1,12 @@ package org.gcube.accounting.aggregator.persistence; -import org.gcube.documentstore.persistence.PersistencePostgreSQL; - /** * @author Luca Frosini (ISTI-CNR) */ class PostgreSQLConnectorStatusDst extends PostgreSQLConnectorStatus implements AggregatorPersistenceStatusDst { protected PostgreSQLConnectorStatusDst() throws Exception { - super(PersistencePostgreSQL.class); + super(AggregatorPersistenceSrc.class); } diff --git a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusSrc.java b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusSrc.java index dafbae2..c490b51 100644 --- a/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusSrc.java +++ b/src/main/java/org/gcube/accounting/aggregator/persistence/PostgreSQLConnectorStatusSrc.java @@ -1,14 +1,12 @@ package org.gcube.accounting.aggregator.persistence; -import org.gcube.accounting.analytics.persistence.postgresql.AccountingPersistenceQueryPostgreSQL; - /** * @author Luca Frosini (ISTI-CNR) */ class PostgreSQLConnectorStatusSrc extends PostgreSQLConnectorStatus implements AggregatorPersistenceStatusSrc { protected PostgreSQLConnectorStatusSrc() throws Exception { - super(AccountingPersistenceQueryPostgreSQL.class); + super(AggregatorPersistenceSrc.class); } }