Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » DynamicEStoreEObjectImpl intended usage
DynamicEStoreEObjectImpl intended usage [message #1259692] Fri, 28 February 2014 17:44 Go to next message
Bertrand Quenin is currently offline Bertrand QueninFriend
Messages: 70
Registered: July 2009
Member
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 19:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: DynamicEStoreEObjectImpl intended usage [message #1259824 is a reply to message #1259783] Fri, 28 February 2014 20:58 Go to previous messageGo to next message
Bertrand Quenin is currently offline Bertrand QueninFriend
Messages: 70
Registered: July 2009
Member
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 06:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to trigger 'organize imports' from Ant build file
Next Topic:to deletion
Goto Forum:
  


Current Time: Fri Apr 26 09:48:31 GMT 2024

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

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

Back to the top