You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Daniel Peter <dp...@yahoo.de> on 2007/04/25 11:40:02 UTC

Static Code Generator and ReadOnly Properties

Hi all,

When I specify a property to be readOnly in the annotated xsd, the static code generator produces an interface/class which provides only a getter method for that property, and no corresponding setter method, as expected.

The generated factory still provides only a null-arg create method. Here I would have expected to see a create method which allows to pass all readOnly properties which would then be used during the creation operation.

How can a readOnly property initially be set?

Thanks, Daniel.





      __________________________________  Kennt man wirklich jeden über 3 Ecken? Die Antworten gibt's bei Yahoo! Clever. www.yahoo.de/clever

Re: Static Code Generator and ReadOnly Properties

Posted by Степан Ильченко <s_...@mail.ru>.
Hi, Peter!

This problem haven't been solved yet. Here is a JIRA on this issue:
https://issues.apache.org/jira/browse/TUSCANY-1180

Regards, Stepan

-----Original Message-----
From: Daniel Peter <dp...@yahoo.de>
To: tuscany-user@ws.apache.org
Date: Wed, 25 Apr 2007 09:40:02 +0000 (GMT)
Subject: Static Code Generator and ReadOnly Properties

> Hi all,
> 
> When I specify a property to be readOnly in the annotated xsd, the static code generator produces an interface/class which provides only a getter method for that property, and no corresponding setter method, as expected.
> 
> The generated factory still provides only a null-arg create method. Here I would have expected to see a create method which allows to pass all readOnly properties which would then be used during the creation operation.
> 
> How can a readOnly property initially be set?
> 
> Thanks, Daniel.
> 
> 
> 
> 
> 
>       __________________________________  Kennt man wirklich jeden Эber 3 Ecken? Die Antworten gibt's bei Yahoo! Clever. www.yahoo.de/clever
> 

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


Re: Static Code Generator and ReadOnly Properties

Posted by Frank Budinsky <fr...@ca.ibm.com>.
Hi Daniel,

The problem with readonly properties is that the SDO spec doesn't 
currently specify how to set/initialize the values of them (this applies 
to dynamic as well as generated DataObjects). Tuscany was waiting for 
clarification, some kind of API/SPI from the spec, which was targeted for 
SDO 2.1 but unfortunately it didn't make it in time. So now it's expected 
to be addressed in the next version of SDO. In the meantime, we recommend 
not using readonly properties. If there's enough demand, it might be 
better to design some Tuscany-specific API, rather than waiting for the 
spec to provide the "proper" way. I believe there is a JIRA issue open for 
this, but currently not at the top of the priority list.

Frank.

Daniel Peter <dp...@yahoo.de> wrote on 04/25/2007 05:40:02 AM:

> Hi all,
> 
> When I specify a property to be readOnly in the annotated xsd, the 
> static code generator produces an interface/class which provides 
> only a getter method for that property, and no corresponding setter 
> method, as expected.
> 
> The generated factory still provides only a null-arg create method. 
> Here I would have expected to see a create method which allows to 
> pass all readOnly properties which would then be used during the 
> creation operation.
> 
> How can a readOnly property initially be set?
> 
> Thanks, Daniel.
> 
> 
> 
> 
> 
>       __________________________________  Kennt man wirklich jeden 
> über 3 Ecken? Die Antworten gibt's bei Yahoo! Clever. 
www.yahoo.de/clever

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