The "calculated field" could be the business operation, but to be seen as a JavaBean attribute, that operation should follow the getter naming convention ( getXxx() ), and it's a Java language convention, not an UML convention.
Maybe the "calculated field" could be an attribute (entities and value objects) with a stereotype, so just the getter would be generated. Optionally OCL could be used to generated the getter body. Walter "Chad Brandon" <[EMAIL PROTECTED]> writes: > > >-----Original Message----- >From: Walter Mour�o [mailto:[EMAIL PROTECTED] >Sent: Wednesday, March 09, 2005 11:37 AM >To: Chad Brandon >Cc: [email protected] >Subject: Re: [Andromda-user] ValueObject attribute 'conversion' > >If I do that, I loose an important feature of Hibernate, queries with >beans in the result set (select new Bean(...) ). I see two options: >getters in the value objects or calculated fields in persistent entities >(is it an option ?). > >[CB] What do you mean exactly with a calculated field on entity? >Wouldn't >that just be the same as modeling a business operation which returned the >calculated field? > >Thanks, > >Walter > >"Chad Brandon" <[EMAIL PROTECTED]> writes: >>I think you could just add your derived value on your entity and then set >>that value on your value object when passing it across. I don't think >>value >>objects should have any operations on them, all they're for is for >sending >>data across. >> >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf Of Wouter >>Zoons >>Sent: Wednesday, March 09, 2005 7:36 AM >>To: Walter Mour�o >>Cc: [email protected] >>Subject: Re: [Andromda-user] ValueObject attribute 'conversion' >> >>I guess we could have people model operations on value objects, which >>would trigger the generation of an implementation class .. >> >>I'm not 100% sure this is a good idea because value objects are >>instantiated all over the place, using their currently known constructor >>(so not the one of the impl class) >> >>-- Wouter >> >>> Hi folks, >>> >>> sometimes I want to have an additional getter in a value object, doing >>> some kind of conversion. >>> >>> Let's suppose the value object have a boolean attribute called "bool" >>and >>> I want an additional getter, like "getBoolAsString" returning strings >>> based on the "bool" actual value. Since value objects doesn't generate >>> "Impl" files what should I do ? create the "Impl" by hand ? I don't >>like >>> this idea because the model will not reflect the situation. >>> >>> other suggestions ? >>> >>> Thanks, >>> >>> >>> >>--------------------------------------------------------------------------- >>> Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A >>> www.arcadian.com.br >>> >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real >users. >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>> _______________________________________________ >>> Andromda-user mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/andromda-user >>> >> >> >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from real users. >>Discover which products truly live up to the hype. Start reading now. >>http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick >>_______________________________________________ >>Andromda-user mailing list >>[email protected] >>https://lists.sourceforge.net/lists/listinfo/andromda-user >> >> >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from real users. >>Discover which products truly live up to the hype. Start reading now. >>http://ads.osdn.com/?ad_ide95&alloc_id396&op=Click >>_______________________________________________ >>Andromda-user mailing list >>[email protected] >>https://lists.sourceforge.net/lists/listinfo/andromda-user >> > > > > >--------------------------------------------------------------------------- >Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A >www.arcadian.com.br > > > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_ide95&alloc_id396&op=Click >_______________________________________________ >Andromda-user mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/andromda-user > --------------------------------------------------------------------------- Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A www.arcadian.com.br ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
