Skip to main content



      Home
Home » Modeling » EMF » DynamicEStoreEObjectImpl intended usage
DynamicEStoreEObjectImpl intended usage [message #1259692] Fri, 28 February 2014 12:44 Go to next message
Eclipse UserFriend
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 #1259783 is a reply to message #1259692] Fri, 28 February 2014 14:57 Go to previous messageGo to next message
Eclipse UserFriend
Bertrand,

Comments below.

On 28/02/2014 6:44 PM, Bertrand Quenin wrote:
> 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.
Certainly CDO makes use of store-based EObject's, so it's likely that's
something of interest. Probably
org.eclipse.emf.ecore.impl.MinimalEStoreEObjectImpl will be the best
place to focus.

>
> Regards,
> BQ.
Re: DynamicEStoreEObjectImpl intended usage [message #1259824 is a reply to message #1259783] Fri, 28 February 2014 15:58 Go to previous messageGo to next message
Eclipse UserFriend
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!

Do you know any documentation that would help picking the right EObject implementation based on requirements for instance?

Anyway, it seems to work with my test suite so I'll follow your advise Smile

many thanks,
BQ.
Re: DynamicEStoreEObjectImpl intended usage [message #1260183 is a reply to message #1259824] Sat, 01 March 2014 01:34 Go to previous message
Eclipse UserFriend
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.
Previous Topic:How to trigger 'organize imports' from Ant build file
Next Topic:to deletion
Goto Forum:
  


Current Time: Sat Jul 05 23:37:02 EDT 2025

Powered by FUDForum. Page generated in 1.07346 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top