Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325077 - Provide an EStoreMinimalEObjectImpl
Summary: Provide an EStoreMinimalEObjectImpl
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 03:42 EDT by Eike Stepper CLA
Modified: 2013-07-10 11:26 EDT (History)
1 user (show)

See Also:


Attachments
My initial attemp to provide a new store-based implementation (9.30 KB, patch)
2013-02-08 06:09 EST, Ed Merks CLA
no flags Details | Diff
Additional changes based on testing with CDO (14.58 KB, patch)
2013-02-08 10:32 EST, Ed Merks 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-13 03:42:42 EDT
The ultra slim diet for EStore-delegating objects would be a very helpful argument to make users consider to generate their model for the more flexible EStore infrastructure and thereby make it easier to switch between persistence mechanisms now or later.
Comment 1 Ed Merks CLA 2013-02-08 06:09:35 EST
Created attachment 226760 [details]
My initial attemp to provide a new store-based implementation

This new implementation is abstract and introduces no additional fields, so only the two fields from MinimalEObjectImpl are present. It should be an ideal replacement for CDO's use of EStoreEObjectImpl.

Note that the cached storage for eContainer and eContainerFeatureID (used for CDO objects that are transient) are available via the protected eBasicInternalContainer and eBasicContainerFeatureID methods.
Comment 2 Ed Merks CLA 2013-02-08 10:32:34 EST
Created attachment 226783 [details]
Additional changes based on testing with CDO

This new patch includes the changes Eike and I tested along with improvements we noted along the way, i.e., removing the last element in the array can set an empty array, when setting an empty array, we don't need to check the container's adapter, and we can check the container's adapters more efficiently.  A new callback is included for handling adding and removing adapters without adding a listener.
Comment 3 Eike Stepper CLA 2013-02-11 01:27:13 EST
Reminder: You may want to add "@since 2.5" to MinimalEObjectImpl ;-)
Comment 4 Ed Merks CLA 2013-02-13 03:29:10 EST
The improvements are committed to master

http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=3ac87e6b677ccb38675e287d21f71febaa030094
Comment 5 Eike Stepper CLA 2013-02-13 04:25:09 EST
Thank you, that's awesome!
Comment 6 Ed Merks CLA 2013-07-10 11:26:16 EDT
The changes are available in Kepler.