Hi Chad,


but that's exacetly what I did:





&nbsp; &nbsp; <template 

&nbsp; &nbsp; &nbsp; &nbsp; 
path="templates/entity/repeatedly/PackageDAOFactory.vsl" 

&nbsp; &nbsp; &nbsp; &nbsp; outputPattern="$generatedFile" 

&nbsp; &nbsp; &nbsp; &nbsp; outlet="backend-java-repeatedly" 

&nbsp; &nbsp; &nbsp; &nbsp; overwrite="true" 

&nbsp; &nbsp; &nbsp; &nbsp; required="false" 

&nbsp; &nbsp; &nbsp; &nbsp; outputOnEmptyElements="false"> 

&nbsp; &nbsp; &nbsp; &nbsp; <modelElements variable="package"> 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <modelElement> 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <type 
name="de.mycomp.metafacades.PackageFacade"> 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <property 
name="createDAOFactory"/> 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </type> 

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </modelElement> 

&nbsp; &nbsp; &nbsp; &nbsp; </modelElements> 

&nbsp; &nbsp; </template>





where the implementation of createDAOFactory looks like this:







&nbsp; &nbsp;protected boolean handleIsCreateDAOFactory&#40;&#41; &#123;

&nbsp; &nbsp; &nbsp; return !getEntities&#40;&#41;.isEmpty&#40;&#41;;

&nbsp; &nbsp;&#125;



&nbsp; &nbsp;protected Collection handleGetEntities&#40;&#41; &#123;

&nbsp; &nbsp; &nbsp; Collection entities = getClasses&#40;&#41;;

&nbsp; &nbsp; &nbsp; CollectionUtils.filter&#40;entities, new 
Predicate&#40;&#41; &#123;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public boolean evaluate&#40;Object 
object&#41; &#123;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return object instanceof MyEntity;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#125;

&nbsp; &nbsp; &nbsp; &#125;&#41;;

&nbsp; &nbsp; &nbsp; return entities;

&nbsp; &nbsp;&#125;





and the andromda-metafacades.xml like this:





&nbsp; &nbsp; <metafacade class="de.mycomp.metafacades.PackageFacadeLogicImpl">

&nbsp; &nbsp; &nbsp; &nbsp; <mapping 
class="org.omg.uml.modelmanagement.UmlPackage$Impl"/>

&nbsp; &nbsp; </metafacade>





However, the PackageFacade for a.b.c is not filtered out by AndroMDA (because 
the parent package a.b isn't filter out) and therefore the method 
"createDAOFactory" returns true and my DAOFactory is created :-(
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=1651#1651
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to