From a6237c24562b867592223d7cc5a61d6bbcb56055 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 25 Nov 2021 17:06:10 +0100 Subject: [PATCH] Changed limit behaviour --- .../postgresql/AccountingPersistenceQueryPostgreSQL.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java b/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java index 42b336a..f424b78 100644 --- a/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java +++ b/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java @@ -50,7 +50,7 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten public static final String URL_PROPERTY_KEY = AccountingPersistenceConfiguration.URL_PROPERTY_KEY; - public static final int MAX_TOP_LIMIT = 50; + public static final int DEFAULT_TOP_LIMIT = 10; protected AccountingPersistenceBackendQueryConfiguration configuration; @@ -215,8 +215,8 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten orderingProperty = AccountingPersistenceQuery.getDefaultOrderingProperties(clz); } - if(limit<1 || limit >50) { - limit = MAX_TOP_LIMIT; + if(limit<1) { + limit = DEFAULT_TOP_LIMIT; } SortedSet result = new TreeSet<>();