From: <bru...@ya...> - 2004-09-11 15:10:42
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#660000"> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> <br> I'm using version 3.0M3<br> Thank you for your answer Manuel, I'll try it as soon as possible.<br> <br> Regards<br> Bruno<br> <br> <br> Manuel Blechschmidt dijo lo siguiente el 11/09/2004 15:53:<br> <blockquote cite="mid000501c49806$aa71b1a0$0200a8c0@Suse" type="cite"> <blockquote type="cite">Hi again, <br> <br> I'm trying to implement bitemporal tables with the two layer specification, separating Valid- <br> Times and Transaction-Times each ones in their own classes. <br> I've created a Bitemporal Stereotype, and i assign it to the association between the two <br> classes. <br> </blockquote> <br> Which version of andromda are you using? <br> <br> <blockquote type="cite"><br> While modifying the HibernateEntity.vsl template I'm getting an error that is turning me <br> crazy... <br> I've done a velocimacro with the following signature #macro ( isInHierarchie $aClass <br> $aStereotype $found) <br> <br> This recursive method finds if one of the classes in the hierarchie of the class passed as first <br> parameter has an asociation labeled with the stereotype passedas the second parameter. <br> The third parameter is an outgoing boolean, also used as stop-condition in the recursion. <br> </blockquote> <br> <br> This applies only to version 3.0 of andromda: <br> You should do this stuff in the Metafacade. Unfortantly there isn't already a Metafacade to do this so I will explain how to create one. <br> <br> So first you have to add a new class with your needed function to the Metafacede Model of the hibernate cartridge. <br> You can create in the class new methods like isInHierarchie with your needed parameter. <br> You find the metafacade model in <andromda-src-dir>/cartridges/andrmda-hibernate/src/uml/HibernateMetafacadeModel.xml.zip <br> <br> You should call the new class HibernateEntityFacade. The class must extend or in uml is generalize by EntityFacade. The EntityFacade you will find in the <andromda-src-dir>/\cartridges\andromda-meta\src\uml\MetaMetafacadeModel.xml.zip <br> <br> You have to link or import this file in Magic Draw. <br> <br> Then you have to regenerate the metafacade: <br> <br> cd <andromda-src-dir>/cartridges/andromda-hibernate/ <br> maven clean <br> maven andromda:run <br> <br> Then you have to tell andromda when wo use this new class. So add the following line to your cartridges\andromda-hibernate\src\META-INF\andromda-metafacades.xml <br> <br> <metafacade <br> metaobjectClass="org.omg.uml.foundation.core.UmlClass$Impl" <br> metafacadeClass="org.andromda.cartridges.hibernate.metafacades.HibernateEntityFacadeLogicImpl" <br> contextRoot="true"> <br> <stereotype>Entity</stereotype> <br> </metafacade <br> <br> <br> Now you have to add your new function to the LogicImpls. <br> So goto <andromda-src-dir>/cartridges/andromda-hibernate/src/java/org/andromda/cartridges/hibernate/metafacades <br> <br> There will be a file called HibernateEntityFacade.java with your new functions. Implement your function here. You have now all the power that java has and java is much more powerful then velocity. <br> <br> Recompile the hibernate cartridge: <br> cd <andromda-src-dir>/cartridges/andromda-hibernate/ <br> maven jar:install <br> <br> and then try to rebuild your application. <br> <br> <blockquote type="cite">Any ideas are wellcome <br> Thanks at advance <br> <br> Regards <br> Bruno <br> </blockquote> <br> Greetings Manuel <br> </blockquote> </body> </html> |