added check on max limit
This commit is contained in:
parent
f0b2c8d61f
commit
186f52cdb5
|
@ -49,7 +49,8 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten
|
||||||
protected static final Logger logger = LoggerFactory.getLogger(AccountingPersistenceQueryPostgreSQL.class);
|
protected static final Logger logger = LoggerFactory.getLogger(AccountingPersistenceQueryPostgreSQL.class);
|
||||||
|
|
||||||
public static final String URL_PROPERTY_KEY = AccountingPersistenceConfiguration.URL_PROPERTY_KEY;
|
public static final String URL_PROPERTY_KEY = AccountingPersistenceConfiguration.URL_PROPERTY_KEY;
|
||||||
// private String baseURL;
|
|
||||||
|
public static final int MAX_TOP_LIMIT = 50;
|
||||||
|
|
||||||
protected AccountingPersistenceBackendQueryConfiguration configuration;
|
protected AccountingPersistenceBackendQueryConfiguration configuration;
|
||||||
|
|
||||||
|
@ -214,8 +215,8 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten
|
||||||
orderingProperty = AccountingPersistenceQuery.getDefaultOrderingProperties(clz);
|
orderingProperty = AccountingPersistenceQuery.getDefaultOrderingProperties(clz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(limit == null) {
|
if(limit == null || limit >50) {
|
||||||
limit = 50;
|
limit = MAX_TOP_LIMIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
SortedSet<NumberedFilter> result = new TreeSet<>();
|
SortedSet<NumberedFilter> result = new TreeSet<>();
|
||||||
|
|
Loading…
Reference in New Issue