[ 
https://issues.apache.org/jira/browse/FINERACT-2167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Saghy updated FINERACT-2167:
---------------------------------
    Fix Version/s: 1.12.0

> Handle sorting and pagination better
> ------------------------------------
>
>                 Key: FINERACT-2167
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2167
>             Project: Apache Fineract
>          Issue Type: Improvement
>    Affects Versions: 1.10.0
>            Reporter: Adam Saghy
>            Priority: Major
>             Fix For: 1.12.0
>
>
> During the years, many different sorting and pagination solution got 
> implemented in Fineract.
> *What better than having N different solution?*
> An N+1-th solution that would be better than the predecessors ;)
> The idea is similar like Spring REST is handling. REST API incoming parameter 
> accepts Pageable class.
> While Fineract is not using Spring REST capabilities rather JAX-RS and Jersey 
> implementation, but we can achieve something really similar:
>  * Create a new ParamProvider for Jersey
>  ** From the incoming request fetch the needed informations
>  *** page
>  *** size
>  *** sort
>  ** Create a new Pageable object with the data
>  ** Via the param provider return the created Pageable object
>  * Create a new annotation `Pagination` which will mark where we want to 
> inject the Pageable object:
>  ** size / value can be provided, default: 50
>  ** maximum size: 10000
>  * Making it more convenient lets support some additional annotations (from 
> Spring Web):
>  * 
>  ** `SortDefault`
>  ** `SortDefault.SoftDefaults`
> The 1st API that will support this is the `Loan locking API - Fetch locked 
> loans`



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to