db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpoes...@apache.org
Subject cvs commit: db-torque/src/generator/src/java/org/apache/torque/engine/database/model Column.java
Date Sun, 16 Nov 2003 22:55:27 GMT
mpoeschl    2003/11/16 14:55:27

  Modified:    src/generator/src/java/org/apache/torque/engine/database/model
                        Column.java
  Log:
  remove unneeded columnType and deprecate isString() (which is also unused)
  
  Revision  Changes    Path
  1.10      +5 -12     db-torque/src/generator/src/java/org/apache/torque/engine/database/model/Column.java
  
  Index: Column.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/database/model/Column.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Column.java	16 Nov 2003 20:16:54 -0000	1.9
  +++ Column.java	16 Nov 2003 22:55:27 -0000	1.10
  @@ -55,8 +55,6 @@
    */
   
   import java.util.ArrayList;
  -import java.util.Date;
  -import java.util.Hashtable;
   import java.util.List;
   
   import org.apache.commons.lang.StringUtils;
  @@ -76,6 +74,7 @@
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
    * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    * @author <a href="mailto:byron_foster@byron_foster@yahoo.com>Byron Foster</a>
  + * @author <a href="mailto:mpoeschl@marmot.at>Martin Poeschl</a>
    * @version $Id$
    */
   public class Column
  @@ -93,7 +92,6 @@
       /** type as defined in schema.xml */
       private String torqueType;
       private String javaType;
  -    private Object columnType;
       private Table parentTable;
       private int position;
       private boolean isPrimaryKey = false;
  @@ -599,10 +597,12 @@
   
       /**
        * Utility method to see if the column is a string
  +     * 
  +     * @deprecated will be removed after the 3.2 release
        */
       public boolean isString()
       {
  -        return (columnType instanceof String);
  +        return (torqueType.indexOf ("CHAR") != -1);
       }
   
       /**
  @@ -809,37 +809,30 @@
           if (tn.indexOf ("CHAR") != -1)
           {
               torqueType = "VARCHAR";
  -            columnType = "";
           }
           else if (tn.indexOf ("INT") != -1)
           {
               torqueType = "INTEGER";
  -            columnType = new Integer (0);
           }
           else if (tn.indexOf ("FLOAT") != -1)
           {
               torqueType = "FLOAT";
  -            columnType = new Float (0);
           }
           else if (tn.indexOf ("DATE") != -1)
           {
               torqueType = "DATE";
  -            columnType = new Date();
           }
           else if (tn.indexOf ("TIME") != -1)
           {
               torqueType = "TIMESTAMP";
  -            columnType = new Date();
           }
           else if (tn.indexOf ("BINARY") != -1)
           {
               torqueType = "LONGVARBINARY";
  -            columnType = new Hashtable();
           }
           else
           {
               torqueType = "VARCHAR";
  -            columnType = "";
           }
       }
   
  
  
  

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