From 3bd6b02fdcff9359023a9986eef254a887621d16 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 22 Nov 2021 13:37:18 +0100 Subject: [PATCH] Using collection in place of list --- .../persistence/AccountingPersistenceBackendQuery.java | 3 ++- .../analytics/persistence/AccountingPersistenceQuery.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceBackendQuery.java b/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceBackendQuery.java index c732087..ded6c7d 100644 --- a/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceBackendQuery.java +++ b/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceBackendQuery.java @@ -4,6 +4,7 @@ package org.gcube.accounting.analytics.persistence; import java.util.Calendar; +import java.util.Collection; import java.util.List; import java.util.Set; import java.util.SortedMap; @@ -71,7 +72,7 @@ public interface AccountingPersistenceBackendQuery { * If the list contains more than one filter with the same key an Exception is thrown * when trying to query. */ - public void setFilters(List filters); + public void setFilters(Collection filters); /** * Query the persistence obtaining a Map where the date is the key and the diff --git a/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQuery.java b/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQuery.java index 7e92130..1cf94d9 100644 --- a/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQuery.java +++ b/src/main/java/org/gcube/accounting/analytics/persistence/AccountingPersistenceQuery.java @@ -5,6 +5,7 @@ package org.gcube.accounting.analytics.persistence; import java.util.ArrayList; import java.util.Calendar; +import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -60,7 +61,7 @@ public class AccountingPersistenceQuery implements AccountingPersistenceBackendQ protected TemporalConstraint temporalConstraint; protected Set contexts; - protected List filters; + protected Collection filters; protected ObjectMapper objectMapper; @@ -90,7 +91,7 @@ public class AccountingPersistenceQuery implements AccountingPersistenceBackendQ } @Override - public void setFilters(List filters) { + public void setFilters(Collection filters) { this.filters = filters; accountingPersistenceBackendQuery.setFilters(filters); }