You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Adam Saghy (Jira)" <ji...@apache.org> on 2025/01/09 20:22:00 UTC

[jira] [Updated] (FINERACT-2167) Handle sorting and pagination better

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

Adam Saghy updated FINERACT-2167:
---------------------------------
    Description: 
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
 ** size / value can be provided, default: 50
 ** maximum size: 10000 (hard limit)
 * Making it more convenient lets support some additional annotations (from Spring Web):
 ** PageableDefault
 ** SortDefault

The 1st API that will support this is the `Loan locking API - Fetch locked loans`

  was:
During the years, many different sorting and pagination solution got implemented in Fineract.

*What better than having N different solution?* 

An N+1 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
 ** size / value can be provided, default: 50
 ** maximum size: 10000 (hard limit)
 * Making it more convenient lets support some additional annotations (from Spring Web):
 ** PageableDefault
 ** SortDefault

The 1st API that will support this is the `Loan locking API - Fetch locked loans`


> 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
>            Assignee: Adam Saghy
>            Priority: Major
>             Fix For: 1.11.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
>  ** size / value can be provided, default: 50
>  ** maximum size: 10000 (hard limit)
>  * Making it more convenient lets support some additional annotations (from Spring Web):
>  ** PageableDefault
>  ** SortDefault
> 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)