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

Modified Files:
        PersistentTagsHandler.java 
Log Message:
Make forAllPersistentFields take notice of the not-pk & only-pk attributes' 
values (XDT-1235).  Document attributes.




Index: PersistentTagsHandler.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/PersistentTagsHandler.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** PersistentTagsHandler.java  16 May 2003 20:41:49 -0000      1.19
--- PersistentTagsHandler.java  15 Jan 2005 01:05:46 -0000      1.20
***************
*** 275,279 ****
       *
       * @param template              The body of the block tag
!      * @param attributes            Description of Parameter
       * @exception XDocletException
       * @see                         
#forAllPersistentMatchedFields(java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String)
--- 275,279 ----
       *
       * @param template              The body of the block tag
!      * @param attributes            The attributes of the template tag
       * @exception XDocletException
       * @see                         
#forAllPersistentMatchedFields(java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String)
***************
*** 281,284 ****
--- 281,290 ----
       * @doc.param                   name="superclasses" optional="true" 
values="true,false" description="Include
       *      persistent fields of superclasses. True by default."
+      * @doc.param                   name="valueobject" optional="true" 
description="If present, only loop over fields
+      *      with a matching [EMAIL PROTECTED] tag."
+      * @doc.param                   name="only-pk" optional="true" 
values="true,false" description="If true, only loop
+      *      over the persistent fields that are in the primary key. False by 
default."
+      * @doc.param                   name="not-pk" optional="true" 
values="true,false" description="If true, only loop
+      *      over the persistent fields that are not in the primary key. False 
by default."
       */
      public void forAllPersistentFields(String template, Properties 
attributes) throws XDocletException
***************
*** 289,297 ****
          String valueObject = attributes.getProperty("valueobject");
  
!         if (attributes.getProperty("only-pk") != null) {
!             forAllPersistentMatchedFields(template, "ejb:pk-field", null, 
superclasses, valueObject);
          }
!         else if (attributes.getProperty("not-pk") != null) {
!             forAllPersistentMatchedFields(template, null, "ejb:pk-field", 
superclasses, valueObject);
          }
          else {
--- 295,303 ----
          String valueObject = attributes.getProperty("valueobject");
  
!         if 
(TypeConversionUtil.stringToBoolean(attributes.getProperty("only-pk"), false)) {
!             forAllPersistentMatchedFields(template, "ejb.pk-field", null, 
superclasses, valueObject);
          }
!         else if 
(TypeConversionUtil.stringToBoolean(attributes.getProperty("not-pk"), false)) {
!             forAllPersistentMatchedFields(template, null, "ejb.pk-field", 
superclasses, valueObject);
          }
          else {



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to