Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325189

Summary: Make CDOCommonView and CommitContext a CDORevisionProvider
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 Keywords: noteworthy
Version: 4.0   
Target Milestone: M2   
Hardware: All   
OS: All   
Whiteboard: Power to the People
Attachments:
Description Flags
Patch v1 - for future reference none

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