User: pathoss
Date: 02/03/30 02:37:42
Modified: core/resources/xdoclet/ejb entitypk.j
Log:
Improved toString().
Revision Changes Path
1.20 +8 -7 xdoclet/core/resources/xdoclet/ejb/entitypk.j
Index: entitypk.j
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/resources/xdoclet/ejb/entitypk.j,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -r1.19 -r1.20
--- entitypk.j 27 Mar 2002 22:19:10 -0000 1.19
+++ entitypk.j 30 Mar 2002 10:37:42 -0000 1.20
@@ -19,7 +19,7 @@
static final long serialVersionUID = <XDtEjbPk:serialVersionUID/>;
</XDtClass:ifDoesntHaveClassTag>
transient private int _hashCode = Integer.MIN_VALUE;
- transient private String value = null;
+ transient private String _toStringValue = null;
<XDtEjbPersistent:forAllPersistentFields superclasses="false" only-pk="true">
public <XDtMethod:methodType/> <XDtMethod:propertyName/>;
@@ -117,18 +117,19 @@
return eq;
}
+ /** @return String representation of this pk in the form of
[field1.field2.field3]. */
public String toString()
{
- if( value == null )
+ if( _toStringValue == null )
{
- value = "[.";
+ _toStringValue = "[";
<XDtEjbPersistent:forAllPersistentFields superclasses="false"
only-pk="true">
- value += this.<XDtMethod:propertyName/>+".";
+ _toStringValue += this.<XDtMethod:propertyName/> + '.';
</XDtEjbPersistent:forAllPersistentFields>
- value += "]";
+ _toStringValue += "]";
}
- return value;
+ return _toStringValue;
}
<XDtMerge:merge file="entitypk-custom.j">
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel