Update of
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/resources
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27897/entity/resources
Modified Files:
entitypk.xdt
Log Message:
Fix CMP field initial upper/lower case problem (XDT-528/XDT-600).
Thanks to Matthias Germann for patches.
Index: entitypk.xdt
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/resources/entitypk.xdt,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** entitypk.xdt 18 Apr 2004 21:14:22 -0000 1.12
--- entitypk.xdt 15 Jan 2005 01:11:39 -0000 1.13
***************
*** 13,17 ****
<XDtEjbPersistent:forAllPersistentFields superclasses="false"
only-pk="true">
! public <XDtMethod:methodType/> <XDtMethod:propertyName/>;
</XDtEjbPersistent:forAllPersistentFields>
--- 13,17 ----
<XDtEjbPersistent:forAllPersistentFields superclasses="false"
only-pk="true">
! public <XDtMethod:methodType/> <XDtEjbCmp:fieldName/>;
</XDtEjbPersistent:forAllPersistentFields>
***************
*** 24,28 ****
{
<XDtEjbPersistent:forAllPersistentFields superclasses="true"
only-pk="true">
! this.<XDtMethod:propertyName/> = <XDtMethod:propertyName/>;
</XDtEjbPersistent:forAllPersistentFields>
}
--- 24,28 ----
{
<XDtEjbPersistent:forAllPersistentFields superclasses="true"
only-pk="true">
! this.<XDtEjbCmp:fieldName/> = <XDtEjbCmp:fieldName/>;
</XDtEjbPersistent:forAllPersistentFields>
}
***************
*** 32,43 ****
public <XDtMethod:methodType/> <XDtMethod:getterMethod/>()
{
! return <XDtMethod:propertyName/>;
}
</XDtEjbPersistent:forAllPersistentFields>
<XDtEjbPersistent:forAllPersistentFields superclasses="false"
only-pk="true">
! public void <XDtMethod:setterMethod/>(<XDtMethod:methodType/>
<XDtMethod:propertyName/>)
{
! this.<XDtMethod:propertyName/> = <XDtMethod:propertyName/>;
}
</XDtEjbPersistent:forAllPersistentFields>
--- 32,43 ----
public <XDtMethod:methodType/> <XDtMethod:getterMethod/>()
{
! return <XDtEjbCmp:fieldName/>;
}
</XDtEjbPersistent:forAllPersistentFields>
<XDtEjbPersistent:forAllPersistentFields superclasses="false"
only-pk="true">
! public void <XDtMethod:setterMethod/>(<XDtMethod:methodType/>
<XDtEjbCmp:fieldName/>)
{
! this.<XDtEjbCmp:fieldName/> = <XDtEjbCmp:fieldName/>;
}
</XDtEjbPersistent:forAllPersistentFields>
***************
*** 50,65 ****
<XDtType:ifIsNotPrimitiveArray value="<XDtMethod:methodType/>">
<XDtType:ifIsOfType type="boolean" value="<XDtMethod:methodType/>"
extent="concrete-type">
! _hashCode += this.<XDtMethod:propertyName/> ? 1 : 0;
</XDtType:ifIsOfType>
<XDtType:ifIsNotOfType type="boolean"
value="<XDtMethod:methodType/>" extent="concrete-type">
! _hashCode += (int)this.<XDtMethod:propertyName/>;
</XDtType:ifIsNotOfType>
</XDtType:ifIsNotPrimitiveArray>
<XDtType:ifIsPrimitiveArray value="<XDtMethod:methodType/>">
! if (this.<XDtMethod:propertyName/> != null) _hashCode +=
this.<XDtMethod:propertyName/>.hashCode();
</XDtType:ifIsPrimitiveArray>
</XDtType:ifIsPrimitive>
<XDtType:ifIsNotPrimitive value="<XDtMethod:methodType/>">
! if (this.<XDtMethod:propertyName/> != null) _hashCode +=
this.<XDtMethod:propertyName/>.hashCode();
</XDtType:ifIsNotPrimitive>
</XDtEjbPersistent:forAllPersistentFields>
--- 50,65 ----
<XDtType:ifIsNotPrimitiveArray value="<XDtMethod:methodType/>">
<XDtType:ifIsOfType type="boolean" value="<XDtMethod:methodType/>"
extent="concrete-type">
! _hashCode += this.<XDtEjbCmp:fieldName/> ? 1 : 0;
</XDtType:ifIsOfType>
<XDtType:ifIsNotOfType type="boolean"
value="<XDtMethod:methodType/>" extent="concrete-type">
! _hashCode += (int)this.<XDtEjbCmp:fieldName/>;
</XDtType:ifIsNotOfType>
</XDtType:ifIsNotPrimitiveArray>
<XDtType:ifIsPrimitiveArray value="<XDtMethod:methodType/>">
! if (this.<XDtEjbCmp:fieldName/> != null) _hashCode +=
this.<XDtEjbCmp:fieldName/>.hashCode();
</XDtType:ifIsPrimitiveArray>
</XDtType:ifIsPrimitive>
<XDtType:ifIsNotPrimitive value="<XDtMethod:methodType/>">
! if (this.<XDtEjbCmp:fieldName/> != null) _hashCode +=
this.<XDtEjbCmp:fieldName/>.hashCode();
</XDtType:ifIsNotPrimitive>
</XDtEjbPersistent:forAllPersistentFields>
***************
*** 85,96 ****
<XDtEjbPersistent:forAllPersistentFields superclasses="true"
only-pk="true">
<XDtType:ifIsPrimitive value="<XDtMethod:methodType/>">
! eq = eq && this.<XDtMethod:propertyName/> ==
pk.<XDtMethod:propertyName/>;
</XDtType:ifIsPrimitive>
<XDtType:ifIsNotPrimitive value="<XDtMethod:methodType/>">
! if( this.<XDtMethod:propertyName/> != null )
{
! eq = eq && this.<XDtMethod:propertyName/>.equals(
pk.<XDtMethod:getterMethod/>() );
}
! else // this.<XDtMethod:propertyName/> == null
{
eq = eq && ( pk.<XDtMethod:getterMethod/>() == null );
--- 85,96 ----
<XDtEjbPersistent:forAllPersistentFields superclasses="true"
only-pk="true">
<XDtType:ifIsPrimitive value="<XDtMethod:methodType/>">
! eq = eq && this.<XDtEjbCmp:fieldName/> == pk.<XDtEjbCmp:fieldName/>;
</XDtType:ifIsPrimitive>
<XDtType:ifIsNotPrimitive value="<XDtMethod:methodType/>">
! if( this.<XDtEjbCmp:fieldName/> != null )
{
! eq = eq && this.<XDtEjbCmp:fieldName/>.equals(
pk.<XDtMethod:getterMethod/>() );
}
! else // this.<XDtEjbCmp:fieldName/> == null
{
eq = eq && ( pk.<XDtMethod:getterMethod/>() == null );
***************
*** 109,113 ****
StringBuffer toStringValue = new StringBuffer("[.");
<XDtEjbPersistent:forAllPersistentFields superclasses="true"
only-pk="true">
! toStringValue.append(this.<XDtMethod:propertyName/>).append('.');
</XDtEjbPersistent:forAllPersistentFields>toStringValue.append(']');
return toStringValue.toString();
--- 109,113 ----
StringBuffer toStringValue = new StringBuffer("[.");
<XDtEjbPersistent:forAllPersistentFields superclasses="true"
only-pk="true">
! toStringValue.append(this.<XDtEjbCmp:fieldName/>).append('.');
</XDtEjbPersistent:forAllPersistentFields>toStringValue.append(']');
return toStringValue.toString();
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel