Cayenne
  1. Cayenne
  2. CAY-1829

Make ResultIterator implement Iterable<T>, create ObjectContext.iterate method

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.M1
    • Component/s: None
    • Labels:
      None

      Description

      1. Make ResultIterator implement Iterable<T> to simplify its use in loops.

      2. Create ObjectContext.iterator method that is available both in ROP and server stacks. CayenneContext can simply do something stupid, like iterating over a regular list.

      3. Create a callback flavor - ObjectContext,iterate(Select, ResultIteratorCallback)

      4. Move ResultIterator to org.apache.cayenne - it should be available to all layers.

      5. Stop throwing CayenneException from all methods.

        Activity

        Andrus Adamchik created issue -
        Andrus Adamchik made changes -
        Field Original Value New Value
        Description Make ResultIterator implement Iterable<T> to simplify its use in loops.

        Create ObjectContext.iterate method that is available both in ROP and server stacks. CayenneContext can simply do something stupid, like iterating over a regular list.
        Make ResultIterator implement Iterable<T> to simplify its use in loops.

        Create ObjectContext.iterate method that is available both in ROP and server stacks. CayenneContext can simply do something stupid, like iterating over a regular list.

        Also stop throwing CayenneException from all methods.
        Andrus Adamchik made changes -
        Description Make ResultIterator implement Iterable<T> to simplify its use in loops.

        Create ObjectContext.iterate method that is available both in ROP and server stacks. CayenneContext can simply do something stupid, like iterating over a regular list.

        Also stop throwing CayenneException from all methods.
        1. Make ResultIterator implement Iterable<T> to simplify its use in loops.

        2. Create ObjectContext.iterator method that is available both in ROP and server stacks. CayenneContext can simply do something stupid, like iterating over a regular list.

        3. Create a callback flavor - ObjectContext,iterate(Select, ResultIteratorCallback)

        4. Move ResultIterator to org.apache.cayenne - it should be available to all layers.

        5. Stop throwing CayenneException from all methods.
        Andrus Adamchik made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development