Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] and eAdapters
[CDO] and eAdapters [message #1007073] Mon, 04 February 2013 10:51 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hello,

Quick question, Are adapters added to a CDO object eAdapters() collection persisted?
If not, what would be the lifecycle for them in relation to the CDOState of the object?

Thanks Christophe
Re: [CDO] and eAdapters [message #1007088 is a reply to message #1007073] Mon, 04 February 2013 12:05 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 04.02.2013 11:51, schrieb Christophe Bouhier:
> Hello,
> Quick question, Are adapters added to a CDO object eAdapters() collection persisted?
No.

> If not, what would be the lifecycle for them in relation to the CDOState of the object?
Can you give an example of what kind of answer you expect?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO] and eAdapters [message #1007123 is a reply to message #1007088] Mon, 04 February 2013 14:36 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Eike,

Thanks for confirming it is not persisted, (The DB schema kind of gave it away already Smile.

On the adapter lifecycle, well, just thinking out loud here. As you know I am messing around with the CDOLazyContentAdapter. Now calling adapt() will attach the adapter to eAdapters(). (Which doesn't make the object DIRTY I believe). I can imagine the adapter being auto-detached, when the state changes. So if an object becomes TRANSIENT.

Perhaps this is the details of the implementation of the content adapter, considering it is updated when the object state changes.

Cheers Christophe
Re: [CDO] and eAdapters [message #1007228 is a reply to message #1007123] Tue, 05 February 2013 07:00 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Hi Christophe,

Everything you say seems totally correct. Adapters are generally a means to attach transient pieces of information
(e.g., UI components) to persistable objects and to receive change notification from these objects. A content adapter
uses these change notifications to react to containment changes (i.e., additions or removals of contained objects) to
attach/detach itself to/from subtrees.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 04.02.2013 15:37, schrieb Christophe Bouhier:
> Eike,
> Thanks for confirming it is not persisted, (The DB schema kind of gave it away already :).
> On the adapter lifecycle, well, just thinking out loud here. As you know I am messing around with the
> CDOLazyContentAdapter. Now calling adapt() will attach the adapter to eAdapters(). (Which doesn't make the object
> DIRTY I believe). I can imagine the adapter being auto-detached, when the state changes. So if an object becomes
> TRANSIENT.
> Perhaps this is the details of the implementation of the content adapter, considering it is updated when the object
> state changes.
> Cheers Christophe
Previous Topic:[CDO][Teneo] How to write / read LOB data stream based?
Next Topic: CDO lock/unlock model event
Goto Forum:
  


Current Time: Sat Nov 29 03:55:19 GMT 2014

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

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