[
https://issues.apache.org/jira/browse/CAY-2817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nikita Timofeev updated CAY-2817:
---------------------------------
Fix Version/s: 5.0.M1
> Pagination flow refactoring needed
> ----------------------------------
>
> Key: CAY-2817
> URL: https://issues.apache.org/jira/browse/CAY-2817
> Project: Cayenne
> Issue Type: Task
> Components: Core Library
> Affects Versions: 5.0.M1
> Reporter: Ivan Nikitka
> Assignee: Nikita Timofeev
> Priority: Major
> Fix For: 5.0.M1
>
>
> The current process for pagination uses direct method for gathering data.
> Without any checks, validations and convertations.
> {code:java}
> public class DataContext extends BaseContext{
> ...
> public ResultIterator performIteratedQuery(Query query)
> }{code}
> {code:java}
> public class IncrementalFaultList<E> implements List<E>, Serializable {
> ...
> protected void fillIn(final Query query, List<Object> elementsList) {
> elementsList.clear();
> try (ResultIterator<?> it = dataContext.performIteratedQuery(query)) {
> while (it.hasNextRow()) {
> elementsList.add(it.nextRow());
> }
> }
> unfetchedObjects = elementsList.size();
> }{code}
> After applying [this|https://github.com/apache/cayenne/pull/594/] PR we need
> to redirect pagination flow to the
> {code:java}
> public class DataContext extends BaseContext{
> ...
> public <T> ResultIterator<T> iterator(final Select<T> query)
> }{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)