Changed limit behaviour

This commit is contained in:
Luca Frosini 2021-11-25 17:06:10 +01:00
parent 08f3175380
commit a6237c2456
1 changed files with 3 additions and 3 deletions

View File

@ -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<NumberedFilter> result = new TreeSet<>();