Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO, transient features, and views?
CDO, transient features, and views? [message #423583] Thu, 02 October 2008 15:22 Go to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
How does CDO deal with transient features? I assume they are not
propagated when the resource is saved. Does this mean that if I have a
CDOView, I can set a transient feature, or is the model truly read-only?

Bryan
Re: CDO, transient features, and views? [message #423585 is a reply to message #423583] Thu, 02 October 2008 15:37 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
They are not propagated when the transaction is saved.
You can modify transient feature.(I didn't try...).
The read-only apply only the persisted space.

"Bryan Hunt" <bhunt@mac.com> wrote in message
news:gc2ovc$i28$1@build.eclipse.org...
> How does CDO deal with transient features? I assume they are not
> propagated when the resource is saved. Does this mean that if I have a
> CDOView, I can set a transient feature, or is the model truly read-only?
>
> Bryan
>
Re: CDO, transient features, and views? [message #423594 is a reply to message #423585] Thu, 02 October 2008 18:17 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> They are not propagated when the transaction is saved.
> You can modify transient feature.(I didn't try...).
> The read-only apply only the persisted space.
>
I don't think that we've tests for this case.
Certainly transient features of non-TRANSIENT CDOObjects are *not*
persisted by CDO.
But I think that modeled transient features will have a generated setter
(if not prevent by other settings)
that will delegate to CDOStore (an EStore not a backend IStore!) where
we call getRevisionForWriting().
This method _should_ throw an IllegalStateException if the associated
CDOView is read-only.

Cheers
/Eike

> "Bryan Hunt" <bhunt@mac.com> wrote in message
> news:gc2ovc$i28$1@build.eclipse.org...
>
>> How does CDO deal with transient features? I assume they are not
>> propagated when the resource is saved. Does this mean that if I have a
>> CDOView, I can set a transient feature, or is the model truly read-only?
>>
>> Bryan
>>
>>
>
>
>


Re: CDO, transient features, and views? [message #423849 is a reply to message #423594] Wed, 08 October 2008 00:05 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Eike, Bryan,

I added a new test in InitialTest.testReadTransientValue. I changed the
model to have Product1.description as a transient feature.

- Transient features are not delegate to CDOStore.
- Using CDOView you can still set them since CDO doesn't interfere with
transient feature.
- You can use them without being wish.

I think it should behave like that as well.

What do you think ?

Simon



"Eike Stepper" <stepper@esc-net.de> wrote in message
news:gc3377$i29$3@build.eclipse.org...
> Simon McDuff schrieb:
>> They are not propagated when the transaction is saved.
>> You can modify transient feature.(I didn't try...).
>> The read-only apply only the persisted space.
>>
> I don't think that we've tests for this case.
> Certainly transient features of non-TRANSIENT CDOObjects are *not*
> persisted by CDO.
> But I think that modeled transient features will have a generated setter
> (if not prevent by other settings)
> that will delegate to CDOStore (an EStore not a backend IStore!) where we
> call getRevisionForWriting().
> This method _should_ throw an IllegalStateException if the associated
> CDOView is read-only.
>
> Cheers
> /Eike
>
>> "Bryan Hunt" <bhunt@mac.com> wrote in message
>> news:gc2ovc$i28$1@build.eclipse.org...
>>
>>> How does CDO deal with transient features? I assume they are not
>>> propagated when the resource is saved. Does this mean that if I have a
>>> CDOView, I can set a transient feature, or is the model truly read-only?
>>>
>>> Bryan
>>>
>>>
>>
>>
>>
Re: CDO, transient features, and views? [message #423854 is a reply to message #423849] Wed, 08 October 2008 07:38 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Simon McDuff schrieb:
> Eike, Bryan,
>
> I added a new test in InitialTest.testReadTransientValue. I changed
> the model to have Product1.description as a transient feature.
>
> - Transient features are not delegate to CDOStore.
You're right. It's obvious from the respective super methods of
CDOObjectImpl:

public void dynamicSet(int dynamicFeatureID, Object value)
{
EStructuralFeature eStructuralFeature =
eDynamicFeature(dynamicFeatureID);
if (eStructuralFeature.isTransient())
{
eSettings[dynamicFeatureID] = value;
}
else
{
eStore().set(this, eStructuralFeature,
InternalEObject.EStore.NO_INDEX, value == NIL ? null : value);
[...]

> - Using CDOView you can still set them since CDO doesn't interfere
> with transient feature.
Correct.

> - You can use them without being wish.
What do you mean here?

>
> I think it should behave like that as well. What do you think ?
First I thought this could be configurable but looking again I think it
must behave like it does now. We have no space for transient features in
CDORevisionData and this structure is sent to the server which can not
respect local view configurations.

Cheers
/Eike


>
> Simon
>
>
>
> "Eike Stepper" <stepper@esc-net.de> wrote in message
> news:gc3377$i29$3@build.eclipse.org...
>> Simon McDuff schrieb:
>>> They are not propagated when the transaction is saved.
>>> You can modify transient feature.(I didn't try...).
>>> The read-only apply only the persisted space.
>>>
>> I don't think that we've tests for this case.
>> Certainly transient features of non-TRANSIENT CDOObjects are *not*
>> persisted by CDO.
>> But I think that modeled transient features will have a generated
>> setter (if not prevent by other settings)
>> that will delegate to CDOStore (an EStore not a backend IStore!)
>> where we call getRevisionForWriting().
>> This method _should_ throw an IllegalStateException if the associated
>> CDOView is read-only.
>>
>> Cheers
>> /Eike
>>
>>> "Bryan Hunt" <bhunt@mac.com> wrote in message
>>> news:gc2ovc$i28$1@build.eclipse.org...
>>>
>>>> How does CDO deal with transient features? I assume they are not
>>>> propagated when the resource is saved. Does this mean that if I
>>>> have a CDOView, I can set a transient feature, or is the model
>>>> truly read-only?
>>>>
>>>> Bryan
>>>>
>>>>
>>>
>>>
>>>


Previous Topic:[EMF] Loading UML Magicdraw models
Next Topic:emf compare
Goto Forum:
  


Current Time: Thu Mar 28 15:40:15 GMT 2024

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

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

Back to the top