Untitled

mail@pastecode.io avatar
unknown
java
2 years ago
1.1 kB
3
Indexable
Never
dataProvider = DataProvider
    .fromFilteringCallbacks(
            query -> {
                Map<String, Object> filters = new HashMap<>();
                filters.put("offset", query.getOffset());
                filters.put("limit", query.getLimit());
                filters.put("accountId", filterAccountTBL.getAccountId());
                filters.put("name", filterAccountTBL.getName());
                filters.put("allowNegativeBalance", filterAccountTBL.getAllowNegativeBalance());
                return accountServices.getAccount(filters).stream();
            }, 
            query -> {
                Map<String, Object> filters = new HashMap<>();
                filters.put("accountId", filterAccountTBL.getAccountId());
                filters.put("name", filterAccountTBL.getName());
                filters.put("allowNegativeBalance", filterAccountTBL.getAllowNegativeBalance());
                LOG.info("Count : {}", accountServices.getAccountCount(filters));
                return accountServices.getAccountCount(filters);
            });
accountData.setPageSize(20);