Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-4173

add pipe functionality to retrieve data by ID

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Current pipe implementation does just support to read data:

       void read(Callback<List<T>> callback);
       void readWithFilter(ReadFilter filter, Callback<List<T>> callback);
      

      It would be helpful to add a "read" by a given ID (maybe RecordID). Something like this:

       void readByID(Integer id, Callback<T> callback); 

      The idea is the following:

       route().from("/cars/{id}").on(RequestMethod.GET).produces(CUSTOM_ALL_DETAILS).to(Cars.class).findById(param("id"));
       route().from("/cars").on(RequestMethod.POST).produces(CUSTOM_MIN_DETAILS).to(Cars.class).getAll();
      

      Having these routes, the "getAll" route returns only a minimum of details (model,...)
      The "findByID" is returning all the details of the car including some related informations.

      Returning full details for the getAll method would be overkill as the data is not needed to display it in a list and would consume to mcuh resources.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            luxpchdig georges goebel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: