Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2817

Pagination flow refactoring

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0-M1
    • 5.0-M1
    • Core Library
    • None

    Description

      The current process for pagination uses direct method for gathering data. Without any checks, validations and convertations. 

      public class DataContext extends BaseContext{
      ...
      public ResultIterator performIteratedQuery(Query query)
      }
      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();
      }

      After applying this PR we need to redirect pagination flow to the

      public class DataContext extends BaseContext{
      ...
      public <T> ResultIterator<T> iterator(final Select<T> query)  
      }

       

      Attachments

        Issue Links

          Activity

            People

              ntimofeev Nikita Timofeev
              Ivan Nikitka Ivan Nikitka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: