db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1098707 - /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
Date Mon, 02 May 2011 18:16:32 GMT
Author: tfischer
Date: Mon May  2 18:16:32 2011
New Revision: 1098707

URL: http://svn.apache.org/viewvc?rev=1098707&view=rev
Log:
Add default value handling for Integer and Long object columns 

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java?rev=1098707&r1=1098706&r2=1098707&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
Mon May  2 18:16:32 2011
@@ -568,6 +568,14 @@ public class OMColumnTransformer
                 // because a range check is performed,
                 fieldDefaultValue = "new Byte(\"" + defaultValue + "\")";
             }
+            else if (JavaType.INTEGER_OBJECT == javaType)
+            {
+                fieldDefaultValue = "Integer.valueOf(" + defaultValue + ")";
+            }
+            else if (JavaType.LONG_OBJECT == javaType)
+            {
+                fieldDefaultValue = "Long.valueOf(" + defaultValue + "L)";
+            }
             else if (primitiveFieldType)
             {
                 fieldDefaultValue = defaultValue;



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message