adamsaghy commented on code in PR #3226:
URL: https://github.com/apache/fineract/pull/3226#discussion_r1235514678


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java:
##########
@@ -214,6 +214,185 @@ public List<JsonObject> queryDataTable(String datatable, 
final String columnFilt
 
         return results;
     }
+    @Override
+    public Page<JsonObject> 
queryDataTableSearch(PagedRequest<DatatableSearchRequest> searchRequest) {
+
+        Objects.requireNonNull(searchRequest, "Search Request Should not be 
Empty");
+        Optional<DatatableSearchRequest> request = searchRequest.getRequest();
+        List<String> resultColumns = 
request.map(DatatableSearchRequest::getResultColumns).orElse(Collections.emptyList());
+        List<ColumnFilter> columnFilters = 
request.map(DatatableSearchRequest::getColumnFilters).orElse(Collections.emptyList());
+        String datatable = 
request.map(DatatableSearchRequest::getDatatable).orElse(null);
+        Pageable pageable = searchRequest.toPageable();
+
+        
this.context.authenticatedUser().validateHasDatatableReadPermission(datatable);
+
+        List<JsonObject> results = new ArrayList<>();
+        AtomicInteger totalElements = new AtomicInteger(0);

Review Comment:
   well... you are not using within streams so i am not fully sure what do you 
mean... I think a simple Long would make sense here hence the 
PageableExecutionUtils.getPage() method waiting for one...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to