[ https://issues.apache.org/jira/browse/CAY-2817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Nikitka updated CAY-2817: ------------------------------ Description: 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||http://example.com/] [https://github.com/apache/cayenne/pull/594] []|http://example.com/] 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} was: 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|http://example.com] 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} > 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 > Priority: Major > > 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||http://example.com/] > [https://github.com/apache/cayenne/pull/594] []|http://example.com/] 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)