mpoeschl 02/04/12 10:22:10
Modified: src/java/org/apache/torque/engine/database/model Column.java
Log:
add method to get the primitive java datatype
Revision Changes Path
1.19 +18 -5
jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Column.java
Index: Column.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Column.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Column.java 11 Apr 2002 22:02:06 -0000 1.18
+++ Column.java 12 Apr 2002 17:22:10 -0000 1.19
@@ -71,7 +71,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jon S. Stevens</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a>
* @author <a href="mailto:byron_foster@[EMAIL PROTECTED]>Byron Foster</a>
- * @version $Id: Column.java,v 1.18 2002/04/11 22:02:06 mpoeschl Exp $
+ * @version $Id: Column.java,v 1.19 2002/04/12 17:22:10 mpoeschl Exp $
*/
public class Column
{
@@ -775,10 +775,23 @@
}
/**
- * Return a string representation of the
- * native java type which corresponds to the JDBC
- * type of this column. Use in the generation
- * of Base objects.
+ * Return a string representation of the primitive java type which
+ * corresponds to the JDBC type of this column.
+ *
+ * @return string representation of the primitive java type
+ */
+ public String getJavaPrimitive()
+ {
+ return TypeMap.getJavaNative(torqueType);
+ }
+
+ /**
+ * Return a string representation of the native java type which corresponds
+ * to the JDBC type of this column. Use in the generation of Base objects.
+ * This method is used by torque, so it returns Key types for primaryKey and
+ * foreignKey columns
+ *
+ * @return java datatype used by torque
*/
public String getJavaNative()
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>