Tom85Ger wrote:
>
>
> Darius Jockel wrote:
>>
>> what about to overwrite the extension:
>> org::fornax::cartridges::uml::javabasic::m2t::DataType::isSet(uml::MultiplicityElement
>> element)
>>
> You probably mean ...::uml2::... or? Thanks for the hint, I didn't know
> that there is this extension.
>
You are right :-)
Tom85Ger wrote:
>
> The advantage of using aop would be that I don't have to change the code
> (of the extension) every time I'm updating the cartridge version (under
> the assumption that it uses a new version of the javabasic cartridge as
> well) right?
>
Yes, as long as the signature of the extension not change, the behavior will
be overwritten.
Tom85Ger wrote:
>
> I've seen uses of aop in cartridges at some places, but I have to get a
> bit more familiar with it in order to do it on my own ;) Wouldn't that
> approach include writing my own cartridge, which basically "wraps" the
> existing (javabasic) cartridge?
>
No you do not have to build your own cartridge. Just place an Advice
Component in your Workflow.oaw.
You see an example in the Hibernate Cartridge:
<component adviceTarget="hibernateCartridge_pojo_generator"
id="JPAAnnotationAdvice" class="oaw.xpand2.GeneratorAdvice">
<advices
value="org::fornax::cartridges::hibernate::m2t::HibernateAnnotations"/>
</component>
Overwrite Extensions by using the 'extensionAdvices' instead of the
'advices', for example(Just example, not tested)
<component adviceTarget="hibernateCartridge_pojo_generator" id="MyAdvices1"
class="oaw.xpand2.GeneratorAdvice">
<extensionAdvices value="m2t::MyAdvice"/>
</component>
<component adviceTarget="hibernateCartridge_mapping_generator"
id="MyAdvice2" class="oaw.xpand2.GeneratorAdvice">
<extensionAdvices value="m2t::MyAdvice"/>
</component>
You need two advice components because because you have to customize the
Mappings and the JavaBeans
Regards
Darius
--
View this message in context:
http://www.nabble.com/Hibernate---Always-generate-List--tp22929008s17564p22953843.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer