Update of 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dao/resources
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3914/modules/ejb/src/xdoclet/modules/ejb/dao/resources

Modified Files:
        dao.xdt dao-methods.xdt 
Log Message:
DAO changes.  Allow a factory class to be used for generating DAO instances
(XDT-1068).  Also eliminate duplicate finders & create methods in DAO
interface if the bean's finder/create methods have @dao.call tags but
automatic generation is being used (XDT-47).




Index: dao.xdt
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dao/resources/dao.xdt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** dao.xdt     26 Mar 2005 10:26:44 -0000      1.6
--- dao.xdt     14 Apr 2005 23:58:00 -0000      1.7
***************
*** 37,41 ****
  </XDtEjbEntity:ifEntity>
  <XDtMethod:forAllMethods superclasses="false" sort="false">
! <XDtMethod:ifHasMethodTag tagName="dao.call">
   <XDtMethod:ifHasMethodTag tagName="dao.call" paramName="name">
      public <XDtMethod:methodType/> <XDtMethod:methodTagValue 
tagName="dao.call" paramName="name"/>(<XDtParameter:parameterList/>) 
<XDtMethod:exceptionList/>;
--- 37,41 ----
  </XDtEjbEntity:ifEntity>
  <XDtMethod:forAllMethods superclasses="false" sort="false">
! <XDtEjbDao:ifDaoMethod>
   <XDtMethod:ifHasMethodTag tagName="dao.call" paramName="name">
      public <XDtMethod:methodType/> <XDtMethod:methodTagValue 
tagName="dao.call" paramName="name"/>(<XDtParameter:parameterList/>) 
<XDtMethod:exceptionList/>;
***************
*** 44,48 ****
      public <XDtMethod:methodType/> 
<XDtEjbIntf:interfaceMethodName/>(<XDtParameter:parameterList/>) 
<XDtMethod:exceptionList/>;
   </XDtMethod:ifDoesntHaveMethodTag>
! </XDtMethod:ifHasMethodTag>
  </XDtMethod:forAllMethods>
  
--- 44,48 ----
      public <XDtMethod:methodType/> 
<XDtEjbIntf:interfaceMethodName/>(<XDtParameter:parameterList/>) 
<XDtMethod:exceptionList/>;
   </XDtMethod:ifDoesntHaveMethodTag>
! </XDtEjbDao:ifDaoMethod>
  </XDtMethod:forAllMethods>
  

Index: dao-methods.xdt
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dao/resources/dao-methods.xdt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dao-methods.xdt     16 May 2003 22:27:31 -0000      1.5
--- dao-methods.xdt     14 Apr 2005 23:58:02 -0000      1.6
***************
*** 23,29 ****
--- 23,35 ----
  </XDtClass:ifHasClassTag>
  <XDtClass:ifDoesntHaveClassTag tagName="ejb.dao" paramName="impl-jndi">
+ <XDtClass:ifHasClassTag tagName="ejb.dao" paramName="impl-factory">
+          dao = (<XDtEjbDao:daoClass/>) <XDtClass:classTagValue 
tagName="ejb.dao" 
paramName="impl-factory"/>.getDaoInstance(<XDtEjbDao:daoClass/>.class);
+ </XDtClass:ifHasClassTag>
+ <XDtClass:ifDoesntHaveClassTag tagName="ejb.dao" paramName="impl-factory">
+ <XDtComment:comment>No impl- parameter present, so assume the class itself is 
the implementation.</XDtComment:comment>
           dao = new <XDtEjbDao:daoClass/>();
  </XDtClass:ifDoesntHaveClassTag>
  </XDtClass:ifDoesntHaveClassTag>
+ </XDtClass:ifDoesntHaveClassTag>
           dao.init();
           return dao;
***************
*** 32,36 ****
  
  <XDtMethod:forAllMethods>
! <XDtMethod:ifHasMethodTag tagName="dao.call">
      public <XDtMethod:methodType/> 
<XDtMethod:methodName/>(<XDtParameter:parameterList/>)
              <XDtMethod:exceptionList/>
--- 38,42 ----
  
  <XDtMethod:forAllMethods>
! <XDtEjbDao:ifDaoMethod>
      public <XDtMethod:methodType/> 
<XDtMethod:methodName/>(<XDtParameter:parameterList/>)
              <XDtMethod:exceptionList/>
***************
*** 47,50 ****
      }
  
! </XDtMethod:ifHasMethodTag>
  </XDtMethod:forAllMethods>
--- 53,56 ----
      }
  
! </XDtEjbDao:ifDaoMethod>
  </XDtMethod:forAllMethods>



-------------------------------------------------------
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
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to