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/test/org/apache/torque/engine/database/model domaintest-schema.xml DomainTest.java
Date Fri, 05 Dec 2003 14:28:28 GMT
mpoeschl    2003/12/05 06:28:28

  Modified:    src/generator/src/java/org/apache/torque/engine/platform
                        PlatformHypersonicImpl.java PlatformAxionImpl.java
                        PlatformMssqlImpl.java PlatformDb2Impl.java
                        PlatformDefaultImpl.java PlatformInterbaseImpl.java
                        PlatformOracleImpl.java PlatformCloudscapeImpl.java
                        PlatformMsaccessImpl.java PlatformSybaseImpl.java
                        PlatformDb2400Impl.java
               src/generator/src/java/org/apache/torque/engine/database/model
                        TypeMap.java Column.java
               src/generator/src/test/org/apache/torque/engine/database/model
                        domaintest-schema.xml DomainTest.java
  Log:
  deprecate Column.getType() and TypeMap.getJdbcType()
  booleanint and booleanchar are now handled by the platform package
  
  Revision  Changes    Path
  1.4       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformHypersonicImpl.java
  
  Index: PlatformHypersonicImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformHypersonicImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlatformHypersonicImpl.java	4 Dec 2003 09:39:38 -0000	1.3
  +++ PlatformHypersonicImpl.java	5 Dec 2003 14:28:27 -0000	1.4
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.CHAR, "VARCHAR"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "BINARY"));
       }
  
  
  
  1.3       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformAxionImpl.java
  
  Index: PlatformAxionImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformAxionImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PlatformAxionImpl.java	16 Nov 2003 20:16:53 -0000	1.2
  +++ PlatformAxionImpl.java	5 Dec 2003 14:28:27 -0000	1.3
  @@ -81,6 +81,7 @@
       {
           setSchemaDomainMapping(new Domain(SchemaType.DECIMAL, "INTEGER"));
           setSchemaDomainMapping(new Domain(SchemaType.CHAR, "VARCHAR"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "BINARY"));
       }
  
  
  
  1.5       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformMssqlImpl.java
  
  Index: PlatformMssqlImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformMssqlImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PlatformMssqlImpl.java	2 Dec 2003 02:27:22 -0000	1.4
  +++ PlatformMssqlImpl.java	5 Dec 2003 14:28:27 -0000	1.5
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.INTEGER, "INT"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT"));
           setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "FLOAT"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT"));
           setSchemaDomainMapping(new Domain(SchemaType.DATE, "DATETIME"));
  
  
  
  1.4       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDb2Impl.java
  
  Index: PlatformDb2Impl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDb2Impl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlatformDb2Impl.java	4 Dec 2003 09:39:38 -0000	1.3
  +++ PlatformDb2Impl.java	5 Dec 2003 14:28:27 -0000	1.4
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.CHAR, "VARCHAR"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "LONG VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.BINARY, "CHAR(n) FOR BIT DATA"));
           setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "VARCHAR(n) FOR BIT DATA"));
  
  
  
  1.6       +5 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDefaultImpl.java
  
  Index: PlatformDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDefaultImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PlatformDefaultImpl.java	4 Dec 2003 09:39:38 -0000	1.5
  +++ PlatformDefaultImpl.java	5 Dec 2003 14:28:27 -0000	1.6
  @@ -90,6 +90,10 @@
               SchemaType type = (SchemaType) iter.next();
               schemaDomainMap.put(type, new Domain(type));
           }
  +        schemaDomainMap.put(SchemaType.BOOLEANCHAR, 
  +                new Domain(SchemaType.BOOLEANCHAR, "CHAR"));
  +        schemaDomainMap.put(SchemaType.BOOLEANINT, 
  +                new Domain(SchemaType.BOOLEANINT, "INTEGER"));
       }
   
       protected void setSchemaDomainMapping(Domain domain) 
  
  
  
  1.4       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformInterbaseImpl.java
  
  Index: PlatformInterbaseImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformInterbaseImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlatformInterbaseImpl.java	4 Dec 2003 09:39:38 -0000	1.3
  +++ PlatformInterbaseImpl.java	5 Dec 2003 14:28:27 -0000	1.4
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.CHAR, "VARCHAR"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "BLOB"));
       }
  
  
  
  1.4       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformOracleImpl.java
  
  Index: PlatformOracleImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformOracleImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlatformOracleImpl.java	4 Dec 2003 09:39:38 -0000	1.3
  +++ PlatformOracleImpl.java	5 Dec 2003 14:28:27 -0000	1.4
  @@ -83,6 +83,7 @@
           setSchemaDomainMapping(new Domain(SchemaType.TINYINT, "NUMBER", "3", "0"));
           setSchemaDomainMapping(new Domain(SchemaType.SMALLINT, "NUMBER", "5", "0"));
           setSchemaDomainMapping(new Domain(SchemaType.INTEGER, "NUMBER"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "NUMBER", "1", "0"));
           setSchemaDomainMapping(new Domain(SchemaType.BIGINT, "NUMBER", "20", "0"));
           setSchemaDomainMapping(new Domain(SchemaType.REAL, "NUMBER"));
           setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "FLOAT"));
  
  
  
  1.4       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformCloudscapeImpl.java
  
  Index: PlatformCloudscapeImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformCloudscapeImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PlatformCloudscapeImpl.java	4 Dec 2003 09:39:38 -0000	1.3
  +++ PlatformCloudscapeImpl.java	5 Dec 2003 14:28:27 -0000	1.4
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.INTEGER, "INT"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT"));
           setSchemaDomainMapping(new Domain(SchemaType.BIGINT, "LONGINT"));
           setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "DOUBLE PRECISION"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "LONG VARCHAR"));
  
  
  
  1.3       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformMsaccessImpl.java
  
  Index: PlatformMsaccessImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformMsaccessImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PlatformMsaccessImpl.java	16 Nov 2003 20:16:53 -0000	1.2
  +++ PlatformMsaccessImpl.java	5 Dec 2003 14:28:27 -0000	1.3
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.CHAR, "VARCHAR"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "MEMO"));
           setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "BINARY"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARBINARY, "BINARY"));
  
  
  
  1.3       +2 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformSybaseImpl.java
  
  Index: PlatformSybaseImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformSybaseImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PlatformSybaseImpl.java	16 Nov 2003 20:16:53 -0000	1.2
  +++ PlatformSybaseImpl.java	5 Dec 2003 14:28:27 -0000	1.3
  @@ -80,6 +80,7 @@
       private void initialize()
       {
           setSchemaDomainMapping(new Domain(SchemaType.INTEGER, "INT"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT"));
           setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "FLOAT"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT"));
           setSchemaDomainMapping(new Domain(SchemaType.DATE, "DATETIME"));
  
  
  
  1.3       +3 -1      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDb2400Impl.java
  
  Index: PlatformDb2400Impl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDb2400Impl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PlatformDb2400Impl.java	16 Nov 2003 20:16:53 -0000	1.2
  +++ PlatformDb2400Impl.java	5 Dec 2003 14:28:27 -0000	1.3
  @@ -81,9 +81,11 @@
       {
           setSchemaDomainMapping(new Domain(SchemaType.TINYINT, "SMALLINT"));
           setSchemaDomainMapping(new Domain(SchemaType.INTEGER, "INT"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANINT, "INT"));
           setSchemaDomainMapping(new Domain(SchemaType.DOUBLE, "DOUBLE PRECISION"));
           setSchemaDomainMapping(new Domain(SchemaType.DECIMAL, "DEC"));
           setSchemaDomainMapping(new Domain(SchemaType.CHAR, "VARCHAR"));
  +        setSchemaDomainMapping(new Domain(SchemaType.BOOLEANCHAR, "VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "LONG VARCHAR"));
           setSchemaDomainMapping(new Domain(SchemaType.VARBINARY, "VARCHAR (32000) FOR BIT
DATA"));
           setSchemaDomainMapping(new Domain(SchemaType.LONGVARBINARY, "LONG VARCHAR FOR BIT
DATA"));
  
  
  
  1.4       +3 -1      db-torque/src/generator/src/java/org/apache/torque/engine/database/model/TypeMap.java
  
  Index: TypeMap.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/database/model/TypeMap.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TypeMap.java	25 Nov 2003 19:19:06 -0000	1.3
  +++ TypeMap.java	5 Dec 2003 14:28:28 -0000	1.4
  @@ -559,6 +559,8 @@
        *
        * @param type the torque added type
        * @return name of the the correct jdbc type
  +     * @deprecated the type conversion is handled by the platform package
  +     *             (since torque 3.2)
        */
       public static SchemaType getJdbcType(SchemaType type)
       {
  
  
  
  1.19      +4 -1      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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Column.java	4 Dec 2003 09:40:39 -0000	1.18
  +++ Column.java	5 Dec 2003 14:28:28 -0000	1.19
  @@ -596,6 +596,9 @@
       
       /**
        * Returns the column jdbc type as an object
  +     * 
  +     * @deprecated the type conversion is handled by the platform package
  +     *             (since torque 3.2)
        */
       public Object getType()
       {
  
  
  
  1.6       +34 -1     db-torque/src/generator/src/test/org/apache/torque/engine/database/model/domaintest-schema.xml
  
  Index: domaintest-schema.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/test/org/apache/torque/engine/database/model/domaintest-schema.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- domaintest-schema.xml	4 Dec 2003 09:40:54 -0000	1.5
  +++ domaintest-schema.xml	5 Dec 2003 14:28:28 -0000	1.6
  @@ -24,5 +24,38 @@
               primaryKey="true" type="INTEGER" />
       <column name="name" size="40" />
     </table>
  -  
  +
  +  <table name="types" description="used to test the handling for all supported types">
  +    <column name="cbit" type="BIT" />
  +    <column name="ctinyint" type="TINYINT" />
  +    <column name="csmallint" type="SMALLINT" />
  +    <column name="cbigint" type="BIGINT" />
  +    <column name="cfloat" type="FLOAT" />
  +    <column name="creal" type="REAL" />
  +    <column name="cnumeric" type="NUMERIC" />
  +    <column name="cdecimal" type="DECIMAL" />
  +    <column name="cchar" type="CHAR" />
  +    <column name="cvarchar" type="VARCHAR" />
  +    <column name="clongvarchar" type="LONGVARCHAR" />
  +    <column name="cdate" type="DATE" />
  +    <column name="ctime" type="TIME" />
  +    <column name="cinteger" type="INTEGER" />
  +    <column name="ctimestamp" type="TIMESTAMP" />
  +    <column name="cbinary" type="BINARY" />
  +    <column name="cvarbinary" type="VARBINARY" />
  +    <column name="clongvarbinary" type="LONGVARBINARY" />
  +    <column name="cnull" type="NULL" />
  +    <column name="cother" type="OTHER" />
  +    <column name="cjavaobject" type="JAVA_OBJECT" />
  +    <column name="cdistinct" type="DISTINCT" />
  +    <column name="cstruct" type="STRUCT" />
  +    <column name="carray" type="ARRAY" />
  +    <column name="cblob" type="BLOB" />
  +    <column name="cclob" type="CLOB" />
  +    <column name="cref" type="REF" />
  +    <column name="cbooleanint" type="BOOLEANINT" />
  +    <column name="cbooleanchar" type="BOOLEANCHAR" />
  +    <column name="cdouble" type="DOUBLE" />
  +  </table>
  +
   </database>
  
  
  
  1.7       +11 -1     db-torque/src/generator/src/test/org/apache/torque/engine/database/model/DomainTest.java
  
  Index: DomainTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/test/org/apache/torque/engine/database/model/DomainTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DomainTest.java	4 Dec 2003 09:40:54 -0000	1.6
  +++ DomainTest.java	5 Dec 2003 14:28:28 -0000	1.7
  @@ -178,4 +178,14 @@
           assertEquals("", col.getAutoIncrementString());
       }    
       
  +    public void testBooleanint() throws Exception
  +    {
  +        Table table = db.getTable("types");
  +        Column col = table.getColumn("cbooleanint");
  +        assertEquals("", col.getAutoIncrementString());
  +        assertEquals("BOOLEANINT", col.getTorqueType());
  +        assertEquals("INTEGER", col.getType());
  +        assertEquals("INTEGER", col.getDomain().getSqlType());
  +       }    
  +    
   }
  
  
  

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