DynamicEStoreEObjectImpl intended usage [message #1259692] |
Fri, 28 February 2014 12:44  |
Eclipse User |
|
|
|
Hi,
I've came across the DynamicEStoreEObjectImpl and I think this is what I'm looking for but I want to double check.
My requirements are:
- I use dynamic EObjects (DynamicEObjectImpl)
- I need to change the default EStore for these dynamic EObjects because i'm working with a database (I evaluated the EMF Resource persistence framework and I think EStore is closer to my requirements).
It seems that DynamicEStoreEObjectImpl is exactly what I need but I want to make sure I'm not missing something here.
Regards,
BQ.
|
|
|
|
|
Re: DynamicEStoreEObjectImpl intended usage [message #1260183 is a reply to message #1259824] |
Sat, 01 March 2014 01:34  |
Eclipse User |
|
|
|
Bertrand,
Comments below.
On 28/02/2014 9:58 PM, Bertrand Quenin wrote:
> Thanks Ed,
>
> I've created the following subclass to
> org.eclipse.emf.ecore.impl.MinimalEStoreEObjectImpl:
>
>
> package com.axway.mda.persistence
>
> import org.eclipse.emf.ecore.EClass
> import org.eclipse.emf.ecore.InternalEObject
> import org.eclipse.emf.ecore.impl.MinimalEStoreEObjectImpl
>
> class GraphEObject extends MinimalEStoreEObjectImpl {
> val InternalEObject.EStore eStore
>
> new(EClass eClass, InternalEObject.EStore eStore) {
> super(eClass)
> this.eStore = eStore
> }
>
> override eStore() {
> eStore
> }
> }
>
>
> To be honest, I'm always a bit puzzled when it comes to extend an
> existing EObject implementation because there are so many!
It depends on your use case. For fine-grained dynamic loading of data
(as CDO does), this is the best tuned implementation for reduced
instance footprint.
>
> Do you know any documentation that would help picking the right
> EObject implementation based on requirements for instance?
No.
>
> Anyway, it seems to work with my test suite so I'll follow your advise :)
>
> many thanks,
> BQ.
|
|
|
Powered by
FUDForum. Page generated in 1.07346 seconds