You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Stepan Ilchenko <s_...@mail.ru> on 2007/01/08 16:01:35 UTC

Initializing of readonly properties in SDO

How can I initialize SDO readonly property using SDO API or Tuscany
Implementation? I'm trying to make my own DAS from specific source and
I need to initially set readonly property. It's not a default value,
it's value that I can't change later by SDO API.

I thought I could change it before I started logging in DataGraph, but
I couldn't because of the exception: "The feature 'ID' is not a valid changeable
feature".

Thanks,
Stepan




---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Initializing of readonly properties in SDO

Posted by Frank Budinsky <fr...@ca.ibm.com>.
This was one of the issues that the SDO spec collaboration workgroup was 
looking at for SDO version 2.1, but unfortunately it wasn't resolved in 
time for 2.1 so now is on the 3.0 list. At Tuscany, we were waiting for 
the spec to set the direction before implementing something for this, so 
it's not currently supported.

If you need to use readonly properties today, then if you are using static 
SDOs you can, as Dan mentioned, add set methods into your generated 
classes. If you are using Dynamic SDO we'll need to add some methods to 
DynamicDataObjectImpl/SDOUtil to let you call some of the internal EMF 
methods to do this. If you need this urgently, please open a JIRA and 
we'll see what we can do (maybe you would like to help?). Otherwise, I 
would avoid using readonly properties for now, and wait for SDO to define 
a proper SPI for doing this.

Frank

"Luciano Resende" <lu...@gmail.com> wrote on 01/08/2007 11:52:47 AM:

> Hi Stepan
> 
>    I was chatting with Brent, that tried before using readony properties 
in
> our Tuscany DAS implementation and wasn't able to have success doing 
that.
> You will need some help from the SDO guys, sorry.
> 
>    May I ask you what datasource you are trying to handle with your own 
DAS
> ?
> 
> -- 
> Luciano Resende
> http://people.apache.org/~lresende
> 
> On 1/8/07, Dan Murphy <dm...@googlemail.com> wrote:
> >
> > Hi Stephan,
> > I think this is a very interesting point. The spec says that setting
> > readonly properties is the responsibility of the DAS, without saying 
how
> > the
> > DAS should do this !
> >
> > One way I have got around this was to generate static classes and 
create
> > my
> > own setter for read only properties, but this is only any good for 
static
> > SDOs.
> >
> > Perhaps the DAS chaps can let is know how they do it... I suspect 
you'll
> > need to cast and dip into the actual DynamicDataObjectImpl class
> >
> > On 08/01/07, Stepan Ilchenko <s_...@mail.ru> wrote:
> > >
> > > How can I initialize SDO readonly property using SDO API or Tuscany
> > > Implementation? I'm trying to make my own DAS from specific source 
and
> > > I need to initially set readonly property. It's not a default value,
> > > it's value that I can't change later by SDO API.
> > >
> > > I thought I could change it before I started logging in DataGraph, 
but
> > > I couldn't because of the exception: "The feature 'ID' is not a 
valid
> > > changeable
> > > feature".
> > >
> > > Thanks,
> > > Stepan
> > >
> > >
> > >
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-user-help@ws.apache.org
> > >
> > >
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Initializing of readonly properties in SDO

Posted by Luciano Resende <lu...@gmail.com>.
Hi Stepan

   I was chatting with Brent, that tried before using readony properties in
our Tuscany DAS implementation and wasn't able to have success doing that.
You will need some help from the SDO guys, sorry.

   May I ask you what datasource you are trying to handle with your own DAS
?

-- 
Luciano Resende
http://people.apache.org/~lresende

On 1/8/07, Dan Murphy <dm...@googlemail.com> wrote:
>
> Hi Stephan,
> I think this is a very interesting point. The spec says that setting
> readonly properties is the responsibility of the DAS, without saying how
> the
> DAS should do this !
>
> One way I have got around this was to generate static classes and create
> my
> own setter for read only properties, but this is only any good for static
> SDOs.
>
> Perhaps the DAS chaps can let is know how they do it... I suspect you'll
> need to cast and dip into the actual DynamicDataObjectImpl class
>
> On 08/01/07, Stepan Ilchenko <s_...@mail.ru> wrote:
> >
> > How can I initialize SDO readonly property using SDO API or Tuscany
> > Implementation? I'm trying to make my own DAS from specific source and
> > I need to initially set readonly property. It's not a default value,
> > it's value that I can't change later by SDO API.
> >
> > I thought I could change it before I started logging in DataGraph, but
> > I couldn't because of the exception: "The feature 'ID' is not a valid
> > changeable
> > feature".
> >
> > Thanks,
> > Stepan
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >
> >
>
>

Re: Initializing of readonly properties in SDO

Posted by Dan Murphy <dm...@googlemail.com>.
Hi Stephan,
I think this is a very interesting point. The spec says that setting
readonly properties is the responsibility of the DAS, without saying how the
DAS should do this !

One way I have got around this was to generate static classes and create my
own setter for read only properties, but this is only any good for static
SDOs.

Perhaps the DAS chaps can let is know how they do it... I suspect you'll
need to cast and dip into the actual DynamicDataObjectImpl class

On 08/01/07, Stepan Ilchenko <s_...@mail.ru> wrote:
>
> How can I initialize SDO readonly property using SDO API or Tuscany
> Implementation? I'm trying to make my own DAS from specific source and
> I need to initially set readonly property. It's not a default value,
> it's value that I can't change later by SDO API.
>
> I thought I could change it before I started logging in DataGraph, but
> I couldn't because of the exception: "The feature 'ID' is not a valid
> changeable
> feature".
>
> Thanks,
> Stepan
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>