Bug 325189 - Make CDOCommonView and CommitContext a CDORevisionProvider
Summary: Make CDOCommonView and CommitContext a CDORevisionProvider
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: M2   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: Power to the People
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2010-09-14 00:26 EDT by Eike Stepper CLA
Modified: 2011-06-23 03:38 EDT (History)
0 users

See Also:


Attachments
Patch v1 - for future reference (11.89 KB, patch)
2010-09-14 00:44 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2010-09-14 00:26:14 EDT
With IStoreAccessor.CommitContext being a CDORevisionProvider it becomes easier to navigate the "before graphs" or "after graphs":

    new IRepository.WriteAccessHandler()
    {
      public void handleTransactionBeforeCommitting(ITransaction transaction, CommitContext commitContext,
          OMMonitor monitor) throws RuntimeException
      {
        CDORevisionDelta revisionDelta = commitContext.getDirtyObjectDeltas()[0];

        CDORevision revision = commitContext.getRevision(revisionDelta.getID());
        CDORevision target = commitContext.getRevision((CDOID)revision.data().get(myFeature, 0));
      }
    };
  }
Comment 1 Eike Stepper CLA 2010-09-14 00:44:59 EDT
Created attachment 178785 [details]
Patch v1 - for future reference
Comment 2 Eike Stepper CLA 2010-09-14 00:45:18 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2011-06-23 03:38:53 EDT
Available in R20110608-1407