Skip to main content



      Home
Home » Modeling » EMF » CDO, transient features, and views?
CDO, transient features, and views? [message #423583] Thu, 02 October 2008 11:22 Go to next message
Eclipse UserFriend
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 11:37 Go to previous messageGo to next message
Eclipse UserFriend
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 14:17 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 07 October 2008 20:05 Go to previous messageGo to next message
Eclipse UserFriend
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 03:38 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 11:26:28 EDT 2025

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

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

Back to the top