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

Bug 325077

Summary: Provide an EStoreMinimalEObjectImpl
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: pierre-charles.david
Version: 2.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
My initial attemp to provide a new store-based implementation
none
Additional changes based on testing with CDO none

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.