Update of /cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6644/modules/ejb/src/xdoclet/modules/ejb/entity
Modified Files:
PersistentTagsHandler.java
Log Message:
fixed dupplicate empty constructor and compilation error in toString() method
when a value-object has a empty persistent fields list (XDT-1373)
Index: PersistentTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/PersistentTagsHandler.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** PersistentTagsHandler.java 9 Apr 2005 16:31:44 -0000 1.23
--- PersistentTagsHandler.java 9 May 2005 21:54:44 -0000 1.24
***************
*** 249,274 ****
*
* @param template The body of the block tag
* @exception XDocletException
* @doc.tag type="block"
*/
! public void ifHasAtLeastOnePersistentField(String template) throws
XDocletException
{
! XClass clazz = getCurrentClass();
! do {
! Collection methods = clazz.getMethods();
! for (Iterator j = methods.iterator(); j.hasNext(); ) {
! XMethod method = (XMethod) j.next();
! if (isPersistentField(method) &&
MethodTagsHandler.isGetter(method.getName())) {
! generate(template);
! return;
}
- }
! // Add super class info
! clazz = clazz.getSuperclass();
! } while (clazz != null);
}
--- 249,286 ----
*
* @param template The body of the block tag
+ * @param attributes
* @exception XDocletException
* @doc.tag type="block"
+ * @doc.param name="valueobject" optional="true"
description="If present, only loop over fields
+ * with a matching [EMAIL PROTECTED] tag."
*/
! public void ifHasAtLeastOnePersistentField(String template, Properties
attributes) throws XDocletException
{
! String valueObject = attributes.getProperty("valueobject");
! if (valueObject != null) {
! if (persistentfieldList(attributes).trim().length() > 0) {
! generate(template);
! }
! }
! else {
! XClass clazz = getCurrentClass();
! do {
! Collection methods = clazz.getMethods();
! for (Iterator j = methods.iterator(); j.hasNext(); ) {
! XMethod method = (XMethod) j.next();
!
! if (isPersistentField(method) &&
MethodTagsHandler.isGetter(method.getName())) {
! generate(template);
! return;
! }
}
! // Add super class info
! clazz = clazz.getSuperclass();
! } while (clazz != null);
! }
}
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel