db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r997978 - /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/JavaType.java
Date Fri, 17 Sep 2010 04:47:21 GMT
Author: tfischer
Date: Fri Sep 17 04:47:20 2010
New Revision: 997978

URL: http://svn.apache.org/viewvc?rev=997978&view=rev
Log:
javadoc

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/JavaType.java

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/JavaType.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/JavaType.java?rev=997978&r1=997977&r2=997978&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/JavaType.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/typemapping/JavaType.java
Fri Sep 17 04:47:20 2010
@@ -19,38 +19,75 @@ package org.apache.torque.templates.type
  * under the License.
  */
 
-
+/**
+ * An enum for all java types known to the generator.
+ *
+ * @version "Id: $
+ */
 public enum JavaType
 {
+    /** java.lang.String. */
     STRING("String", false, false, null),
+    /** java.math.BigDecimal. */
     BIG_DECIMAL("BigDecimal", false, true, "java.math."),
+    /** primitive boolean. */
     BOOLEAN_PRIMITIVE("boolean", true, false, null),
+    /** java.lang.Boolean. */
     BOOLEAN_OBJECT("Boolean", false, false, null),
+    /** primitive byte. */
     BYTE_PRIMITIVE("byte", true, true, null),
+    /** java.lang.Byte. */
     BYTE_OBJECT("Byte", false, true, null),
+    /** primitive short. */
     SHORT_PRIMITIVE("short", true, true, null),
+    /** java.lang.Short. */
     SHORT_OBJECT("Short", false, true, null),
+    /** primitive int. */
     INTEGER_PRIMITIVE("int", true, true, null),
+    /** java.lang.Integer. */
     INTEGER_OBJECT("Integer", false, true, null),
+    /** primitive long. */
     LONG_PRIMITIVE("long", true, true, null),
+    /** java.lang.Long. */
     LONG_OBJECT("Long", false, true, null),
+    /** primitive float. */
     FLOAT_PRIMITIVE("float", true, true, null),
+    /** java.lang.Float. */
     FLOAT_OBJECT("Float", false, true, null),
+    /** primitive double. */
     DOUBLE_PRIMITIVE("double", true, true, null),
+    /** java.lang.Double. */
     DOUBLE_OBJECT("Double", false, true, null),
+    /** primitive char. */
     CHAR_PRIMITIVE("char", true, false, null),
+    /** java.lang.Char. */
     CHAR_OBJECT("Char", false, false, null),
+    /** primitive byte array. */
     BYTE_PRIMITIVE_ARRAY("byte[]", false, false, null),
+    /** java.util.Date. */
+    // TODO move package prefix to last argument
     DATE("java.util.Date", false, false, null);
 
+    /** The class name without package name. */
     private String className;
 
+    /** Whether the type is a primitive type. */
     private boolean primitive;
 
+    /** Whether the type is a number. */
     private boolean number;
 
+    /** The package prefix for object types, if different from java.lang. */
     private String packagePrefix;
 
+    /**
+     * Constructor.
+     *
+     * @param className the class name, not null.
+     * @param primitive Whether the type is a primitive type.
+     * @param number Whether the type is a number.
+     * @param packagePrefix The package prefix for object types, or null.
+     */
     private JavaType(
             String className,
             boolean primitive,
@@ -63,26 +100,51 @@ public enum JavaType
         this.packagePrefix = packagePrefix;
     }
 
+    /**
+     * Returns whether the type is a primitive type.
+     *
+     * @return true if the type is a primitive type, false otherwise.
+     */
     public boolean isPrimitive()
     {
         return primitive;
     }
 
+    /**
+     * Returns whether the type is a number.
+     *
+     * @return true if the type is a number, false otherwise.
+     */
     public boolean isNumber()
     {
         return number;
     }
 
+    /**
+     * Returns the class name.
+     *
+     * @return the unqualified class name.
+     */
     public String getClassName()
     {
         return className;
     }
 
+    /**
+     * Returns the package prefix.
+     *
+     * @return the package prefix, or null.
+     */
     public String getPackagePrefix()
     {
         return packagePrefix;
     }
 
+    /**
+     * Returns the class name, if necessary qualified with the package name.
+     *
+     * @return the full class name.
+     */
     public String getFullClassName()
     {
         if (packagePrefix == null)
@@ -94,6 +156,4 @@ public enum JavaType
             return packagePrefix + className;
         }
     }
-
-
 }



---------------------------------------------------------------------
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