Bug 298334 - Make the changes in a CDOTransaction im- and exportable
Summary: Make the changes in a CDOTransaction im- and exportable
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA Friend
QA Contact: Eike Stepper CLA Friend
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 297967
  Show dependency tree
 
Reported: 2009-12-21 13:48 EST by Eike Stepper CLA Friend
Modified: 2010-06-29 09:23 EDT (History)
2 users (show)

See Also:
stepper: documentation+


Attachments
A contribution for the import/export of transaction changes (10.48 KB, patch)
2009-12-22 04:18 EST, Gonzague Reydet CLA Friend
no flags Details | Diff
import/export of transaction changes (16.04 KB, patch)
2009-12-22 09:39 EST, Gonzague Reydet CLA Friend
stepper: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA Friend 2009-12-21 13:48:05 EST
Add the methods exportChanges() and importChanges() to CDOTransaction
Comment 1 Gonzague Reydet CLA Friend 2009-12-22 04:18:34 EST
Created attachment 154923 [details]
A contribution for the import/export of transaction changes

A patch to add the import/export of changes made on a CDO Transaction.

I confirm that I'm the only author and I apply the EPL.
Comment 2 Gonzague Reydet CLA Friend 2009-12-22 09:39:39 EST
Created attachment 154930 [details]
import/export of transaction changes

Fixes a couple of issues in my previous patch
Comment 3 Eike Stepper CLA Friend 2009-12-28 05:22:15 EST
Committed to HEAD
Comment 4 Eike Stepper CLA Friend 2010-05-08 04:09:17 EDT
Example:

    OutputStream fos = new FileOutputStream("changes.bin");

    try
    {
      CDOSavepoint[] savepoints = transaction1.exportChanges(fos);
    }
    finally
    {
      IOUtil.close(fos);
    }

    InputStream fis = new FileInputStream("changes.bin");

    try
    {
      CDOSavepoint[] savepoints = transaction2.importChanges(fis, true);
    }
    finally
    {
      IOUtil.close(fis);
    }
Comment 5 Eike Stepper CLA Friend 2010-06-29 04:40:26 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/