3 Replies Latest reply: Nov 10, 2008 5:58 PM by Amin Mohammed-Coleman RSS

    Getting all revisions for Entity

    Amin Mohammed-Coleman Newbie

      Hi

      I have started on a app service method to show the history of a given entity. I have done the following (which I think looks inefficient and not very good)

      List<Number> pcRevisionNumbers = reader.getRevisions(contact.getClass(), contact.getId());
       for (Number number : pcRevisionNumbers) {
       Contact c = reader.find(contact.getClass(), contact.getId(), number);
       historyResult.add(c);
       }
      


      this has been probably asked before...but is there a better way of doing this?

      any help would be appreciated.

      Thanks