Untitled

 avatar
unknown
plain_text
2 years ago
1.1 kB
3
Indexable
public List<AccountModel> getAccount(Map<String, Object> filters) {
    List<AccountModel> datalog = null;
    try {
        datalog = new JsonResponseReader(restMockvaEndpoint.send(new EndpointRequestBuilder()
                .method(HttpMethod.GET)
                .properties(filters)
                .resource("/account")
                .build()
        )).getContentTable(AccountModel.class).getData();
    } catch (Exception ex) {
        Logger.getLogger(AccountServices.class.getName()).log(Level.SEVERE, null, ex);
    }
    return datalog;
}

public int getAccountCount(Map<String, Object> filters) {
    int countData = 0;
    try {
        countData = new JsonResponseReader(restMockvaEndpoint.send(new EndpointRequestBuilder()
                .method(HttpMethod.GET)
                .properties(filters)
                .resource("/account")
                .build()
        )).getContentTable(AccountModel.class).getRowCount().intValue();
    } catch (Exception e) {
        Logger.getLogger(AccountServices.class.getName()).log(Level.SEVERE, null, e);
    }
    return countData;
}
Editor is loading...