Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Hooking Adapters to instances in PersistableEList
[Teneo] Hooking Adapters to instances in PersistableEList [message #546625] Tue, 13 July 2010 14:55 Go to next message
Anthony Juckel is currently offline Anthony JuckelFriend
Messages: 19
Registered: July 2009
Junior Member
I have a case where I want to have a feature of my container EObject
derived from features of objects contained in a list. I have the
adapters set up properly for elements added to the EList, but the set of
objects that Teneo is instantiating don't seem to pass through the usual
EMF notification for adding elements, so I don't have a hook to listen
to changes on them.

I've tried adding a setList method on my container thinking that Teneo
would use that to insert its PersistableEList, but that doesn't work,
which leads me to believe that Teneo is just setting the field directly.

Does anyone know how I could hook into Teneo to properly get add
adapters to the set of contained objects loaded from the database?
Re: [Teneo] Hooking Adapters to instances in PersistableEList [message #546927 is a reply to message #546625] Wed, 14 July 2010 15:17 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Anthony,
There are cases that Teneo will set the field directly. See the EListPropertyHandler class. Teneo assumes that normally
the application does not want to get notified when objects are read from the db into the list. So therefore this is done
differently. The EMF list handling is quite tricky (see the source code of the EListPropertyHandler).

You can replace the EListPropertyHandler with your own implementation by using the Teneo extension mechanism:
http://wiki.eclipse.org/Teneo/Hibernate/Extensions

btw, I am on holiday therefore my replies are slower (I check email once every 1-2 days).

gr. Martin

On 07/13/2010 04:55 PM, Anthony Juckel wrote:
> I have a case where I want to have a feature of my container EObject
> derived from features of objects contained in a list. I have the
> adapters set up properly for elements added to the EList, but the set of
> objects that Teneo is instantiating don't seem to pass through the usual
> EMF notification for adding elements, so I don't have a hook to listen
> to changes on them.
>
> I've tried adding a setList method on my container thinking that Teneo
> would use that to insert its PersistableEList, but that doesn't work,
> which leads me to believe that Teneo is just setting the field directly.
>
> Does anyone know how I could hook into Teneo to properly get add
> adapters to the set of contained objects loaded from the database?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Make int from xsd:integer
Next Topic:[Teneo] Extra Lazy Loading problems
Goto Forum:
  


Current Time: Thu Apr 25 09:15:48 GMT 2024

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

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

Back to the top