jmcnally 02/05/09 17:42:52
Modified: src/conf build.properties
src/templates/om Object.vm ObjectWithManager.vm
Log:
patch by James A. Hillyerd <[EMAIL PROTECTED]> to
remove the overloaded setters for PK's and FK's that take a String arg.
Some JavaBean implmentations have problems with overloaded setters.
Revision Changes Path
1.14 +5 -0 jakarta-turbine-torque/src/conf/build.properties
Index: build.properties
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/conf/build.properties,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- build.properties 9 May 2002 23:07:37 -0000 1.13
+++ build.properties 10 May 2002 00:42:52 -0000 1.14
@@ -67,6 +67,10 @@
#
# useManagers=Generate Manager classes that use JCS for caching. Still
# considered experimental.
+#
+# overloadKeySetters=false prevents overloading of the setter method for
+# primary/foreign keys. This is useful when working with broken
+# JavaBean implementations.
# -------------------------------------------------------------------
targetPackage=org.apache.torque
@@ -77,6 +81,7 @@
addTimeStamp=true
addIntakeRetrievable=false
useManagers=false
+overloadKeySetters=true
# -------------------------------------------------------------------
#
1.29 +10 -8 jakarta-turbine-torque/src/templates/om/Object.vm
Index: Object.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/Object.vm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Object.vm 30 Apr 2002 23:49:48 -0000 1.28
+++ Object.vm 10 May 2002 00:42:52 -0000 1.29
@@ -194,14 +194,16 @@
}
##if ($complexObjectModel)
- #if ($col.isPrimaryKey() || $col.isForeignKey())
- /**
- * Set the value of $cfc as a string.
- */
- public void set${cfc}(String v ) $throwsClause
- {
- set${cfc}(new ${cjtype}(v));
- }
+ #if ($overloadKeySetters)
+ #if ($col.isPrimaryKey() || $col.isForeignKey())
+ /**
+ * Set the value of $cfc as a string.
+ */
+ public void set${cfc}(String v ) $throwsClause
+ {
+ set${cfc}(new ${cjtype}(v));
+ }
+ #end
#end
##end
1.8 +10 -8 jakarta-turbine-torque/src/templates/om/ObjectWithManager.vm
Index: ObjectWithManager.vm
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/ObjectWithManager.vm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ObjectWithManager.vm 30 Apr 2002 23:49:48 -0000 1.7
+++ ObjectWithManager.vm 10 May 2002 00:42:52 -0000 1.8
@@ -198,14 +198,16 @@
}
##if ($complexObjectModel)
- #if ($col.isPrimaryKey() || $col.isForeignKey())
- /**
- * Set the value of $cfc as a string.
- */
- public void set${cfc}(String v ) $throwsClause
- {
- set${cfc}(new ${cjtype}(v));
- }
+ #if ($overloadKeySetters)
+ #if ($col.isPrimaryKey() || $col.isForeignKey())
+ /**
+ * Set the value of $cfc as a string.
+ */
+ public void set${cfc}(String v ) $throwsClause
+ {
+ set${cfc}(new ${cjtype}(v));
+ }
+ #end
#end
##end
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>