mpoeschl    2002/10/24 13:31:05

  Modified:    src/conf default.properties
               src/templates/om Object.vm ObjectWithManager.vm
               xdocs    properties-reference.xml
  Log:
  TRQS37: Torque 3.0 doesn't work with Intake in Turbine 2.x's Retrievable interface
  o added a property torque.retrievableInterface (defaults to the turbine-2 version)
  
  Revision  Changes    Path
  1.11      +1 -0      jakarta-turbine-torque/src/conf/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/conf/default.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- default.properties        5 Oct 2002 18:00:03 -0000       1.10
  +++ default.properties        24 Oct 2002 20:31:04 -0000      1.11
  @@ -107,6 +107,7 @@
   
   torque.addGetByNameMethod = ${addGetByNameMethod}
   torque.addIntakeRetrievable = ${addIntakeRetrievable}
  +torque.retrievableInterface = org.apache.turbine.om.Retrievable
   torque.addSaveMethod = ${addSaveMethod}
   torque.addTimeStamp = ${addTimeStamp}
   torque.basePrefix = ${basePrefix}
  
  
  
  1.53      +2 -2      jakarta-turbine-torque/src/templates/om/Object.vm
  
  Index: Object.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/Object.vm,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- Object.vm 24 Oct 2002 15:17:00 -0000      1.52
  +++ Object.vm 24 Oct 2002 20:31:05 -0000      1.53
  @@ -23,7 +23,7 @@
   import org.apache.commons.lang.ObjectUtils;
   #end
   #if ($addIntakeRetrievable)
  -import org.apache.fulcrum.intake.Retrievable;
  +import $retrievableInterface;
   #end
   import org.apache.torque.TorqueException;
   import org.apache.torque.om.BaseObject;
  @@ -63,7 +63,7 @@
    */
   public abstract class $basePrefix$table.JavaName $extendsBaseClass
   #if ($addIntakeRetrievable)
  -    implements Retrievable
  +    implements $retrievableInterface
   #end
   {
       /** The Peer class */
  
  
  
  1.28      +23 -23    jakarta-turbine-torque/src/templates/om/ObjectWithManager.vm
  
  Index: ObjectWithManager.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/templates/om/ObjectWithManager.vm,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- ObjectWithManager.vm      24 Oct 2002 15:17:00 -0000      1.27
  +++ ObjectWithManager.vm      24 Oct 2002 20:31:05 -0000      1.28
  @@ -23,7 +23,7 @@
   import org.apache.commons.lang.ObjectUtils;
   #end
   #if ($addIntakeRetrievable)
  -import org.apache.fulcrum.intake.Retrievable;
  +import $retrievableInterface;
   #end
   import org.apache.torque.TorqueException;
   import org.apache.torque.om.BaseObject;
  @@ -63,7 +63,7 @@
    */
   public abstract class $basePrefix$table.JavaName $extendsBaseClass
   #if ($addIntakeRetrievable)
  -    implements Retrievable
  +    implements $retrievableInterface
   #end
   {
       /** The Peer class */
  @@ -350,9 +350,9 @@
               #set ($col = $table.getColumn($colName) )
   
               #set ($fktype = $col.JavaNative)
  -            #if ($fktype == "short") 
  +            #if ($fktype == "short")
                   set${col.JavaName}(((NumberKey) keys[$i]).shortValue());
  -            #elseif($fktype == "int") 
  +            #elseif($fktype == "int")
                   set${col.JavaName}(((NumberKey) keys[$i]).intValue());
               #elseif($fktype == "long")
                   set${col.JavaName}(((NumberKey) keys[$i]).longValue());
  @@ -364,9 +364,9 @@
                   set${col.JavaName}(((NumberKey) keys[$i]).floatValue());
               #elseif($fktype == "double")
                   set${col.JavaName}(((NumberKey) keys[$i]).doubleValue());
  -            #elseif($fktype == "Short") 
  +            #elseif($fktype == "Short")
                   set${col.JavaName}(new Short(((NumberKey) keys[$i]).shortValue()));
  -            #elseif($fktype == "Integer") 
  +            #elseif($fktype == "Integer")
                   set${col.JavaName}(new Integer(((NumberKey) keys[$i]).intValue()));
               #elseif($fktype == "Long")
                   set${col.JavaName}(new Long(((NumberKey) keys[$i]).longValue()));
  @@ -389,9 +389,9 @@
           #set ($col = $table.getColumn($colName) )
   
           #set ($fktype = $col.JavaNative)
  -        #if ($fktype == "short") 
  +        #if ($fktype == "short")
               set${col.JavaName}(((NumberKey) key).shortValue());
  -        #elseif($fktype == "int") 
  +        #elseif($fktype == "int")
               set${col.JavaName}(((NumberKey) key).intValue());
           #elseif($fktype == "long")
               set${col.JavaName}(((NumberKey) key).longValue());
  @@ -403,9 +403,9 @@
               set${col.JavaName}(((NumberKey) key).floatValue());
           #elseif($fktype == "double")
               set${col.JavaName}(((NumberKey) key).doubleValue());
  -        #elseif($fktype == "Short") 
  +        #elseif($fktype == "Short")
               set${col.JavaName}(new Short(((NumberKey) key).shortValue()));
  -        #elseif($fktype == "Integer") 
  +        #elseif($fktype == "Integer")
               set${col.JavaName}(new Integer(((NumberKey) key).intValue()));
           #elseif($fktype == "Long")
               set${col.JavaName}(new Long(((NumberKey) key).longValue()));
  @@ -1174,9 +1174,9 @@
        */
       public void setPrimaryKey(ObjectKey $clo)
           $throwsClause {
  -        #if ($cjtype == "short") 
  +        #if ($cjtype == "short")
               set${col.JavaName}(((NumberKey)$clo).shortValue());
  -        #elseif($cjtype == "int") 
  +        #elseif($cjtype == "int")
               set${col.JavaName}(((NumberKey)$clo).intValue());
           #elseif($cjtype == "long")
               set${col.JavaName}(((NumberKey)$clo).longValue());
  @@ -1188,9 +1188,9 @@
               set${col.JavaName}(((NumberKey)$clo).floatValue());
           #elseif($cjtype == "double")
               set${col.JavaName}(((NumberKey)$clo).doubleValue());
  -        #elseif($cjtype == "Short") 
  +        #elseif($cjtype == "Short")
               set${col.JavaName}(new Short(((NumberKey)$clo).shortValue()));
  -        #elseif($cjtype == "Integer") 
  +        #elseif($cjtype == "Integer")
               set${col.JavaName}(new Integer(((NumberKey)$clo).intValue()));
           #elseif($cjtype == "Long")
               set${col.JavaName}(new Long(((NumberKey)$clo).longValue()));
  @@ -1214,9 +1214,9 @@
        */
       public void setPrimaryKey(String key) $throwsClause
       {
  -        #if ($cjtype == "short") 
  +        #if ($cjtype == "short")
               set${col.JavaName}(Short.parseShort(key));
  -        #elseif($cjtype == "int") 
  +        #elseif($cjtype == "int")
               set${col.JavaName}(Integer.parseInt(key));
           #elseif($cjtype == "long")
               set${col.JavaName}(Long.parseLong(key));
  @@ -1228,9 +1228,9 @@
               set${col.JavaName}(Float.parseFloat(key));
           #elseif($cjtype == "double")
               set${col.JavaName}(Double.parseDouble(key));
  -        #elseif($cjtype == "Short") 
  +        #elseif($cjtype == "Short")
               set${col.JavaName}(new Short(key));
  -        #elseif($cjtype == "Integer") 
  +        #elseif($cjtype == "Integer")
               set${col.JavaName}(new Integer(key));
           #elseif($cjtype == "Long")
               set${col.JavaName}(new Long(key));
  @@ -1261,11 +1261,11 @@
            SimpleKey[] keys = (SimpleKey[]) key.getValue();
           SimpleKey tmpKey = null;
        #set ($i = 0)
  -    #foreach ($pk in $table.PrimaryKeys) 
  +    #foreach ($pk in $table.PrimaryKeys)
           #set ($pktype = $pk.JavaNative)
  -        #if ($pktype == "short") 
  +        #if ($pktype == "short")
               set${pk.JavaName}(((NumberKey)keys[$i]).shortValue());
  -        #elseif($pktype == "int") 
  +        #elseif($pktype == "int")
               set${pk.JavaName}(((NumberKey)keys[$i]).intValue());
           #elseif($pktype == "long")
               set${pk.JavaName}(((NumberKey)keys[$i]).longValue());
  @@ -1277,9 +1277,9 @@
               set${pk.JavaName}(((NumberKey)keys[$i]).floatValue());
           #elseif($pktype == "double")
               set${pk.JavaName}(((NumberKey)keys[$i]).doubleValue());
  -        #elseif($pktype == "Short") 
  +        #elseif($pktype == "Short")
               set${pk.JavaName}(new Short(((NumberKey)keys[$i]).shortValue()));
  -        #elseif($pktype == "Integer") 
  +        #elseif($pktype == "Integer")
               set${pk.JavaName}(new Integer(((NumberKey)keys[$i]).intValue()));
           #elseif($pktype == "Long")
               set${pk.JavaName}(new Long(((NumberKey)keys[$i]).longValue()));
  
  
  
  1.4       +19 -11    jakarta-turbine-torque/xdocs/properties-reference.xml
  
  Index: properties-reference.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/xdocs/properties-reference.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- properties-reference.xml  5 Oct 2002 18:00:03 -0000       1.3
  +++ properties-reference.xml  24 Oct 2002 20:31:05 -0000      1.4
  @@ -32,7 +32,7 @@
     <td><code> torque.project </code></td>
     <td><code> N/A </code></td>
     <td>
  -    The name of the project Torque will generate code for. After choosing the 
  +    The name of the project Torque will generate code for. After choosing the
       project name, your XML schema file (originally <code>project-schema.xml</code>),
       that Torque will read should be renamed to 
<code>${torque.project}-schema.xml</code>.
     </td>
  @@ -40,9 +40,9 @@
   <tr>
     <td><code> torque.database </code></td>
     <td><code> N/A </code></td>
  -  <td> 
  +  <td>
       Torque must know the target database platform in order to generate the
  -    appropriate Java and SQL code. Currently supported values are: 
  +    appropriate Java and SQL code. Currently supported values are:
         axion, cloudscape, db2, db2400, hypersonic, interbase, mssql, mysql,
         oracle, postgresql, sapdb, and sybase.
     </td>
  @@ -80,7 +80,7 @@
     <td><code> false </code></td>
     <td>
       If true, Torque will not look in the <code>templatePath</code> directory,
  -    for templates, but instead load them from the classpath, allowing you to 
  +    for templates, but instead load them from the classpath, allowing you to
       use Torque without extracting it from the jar.
     </td>
   </tr>
  @@ -144,7 +144,7 @@
     <td><code> torque.database.createUrl </code></td>
     <td><code> N/A </code></td>
     <td>
  -    The JDBC URL that Torque can use to create and drop databases if instructed 
  +    The JDBC URL that Torque can use to create and drop databases if instructed
       to do so. This is typically an administrative URL.
     </td>
   </tr>
  @@ -152,8 +152,8 @@
     <td><code> torque.database.buildUrl </code></td>
     <td><code> N/A </code></td>
     <td>
  -    The JDBC URL that will be used to access yourdatabase. Torque can use 
  -    this to create your tables if instructed to do so.  This value should 
  +    The JDBC URL that will be used to access yourdatabase. Torque can use
  +    this to create your tables if instructed to do so.  This value should
       reflect the database name specified in the database schema file
       (described in the next section).
     </td>
  @@ -242,11 +242,19 @@
     <td><code> torque.addIntakeRetrievable </code></td>
     <td><code> false </code></td>
     <td>
  -    If true, the data objects will implement Intake's Retrievable 
  +    If true, the data objects will implement Intake's Retrievable
       interface
     </td>
   </tr>
   <tr>
  +  <td><code> torque.retrievableInterface </code></td>
  +  <td><code> org.apache.turbine.om.Retrievable (for Turbine 2.2) </code></td>
  +  <td>
  +    Defines the Retrievable interface. (set to
  +    org.apache.fulcrum.intake.Retrievable if you are using Fulcrum)
  +  </td>
  +</tr>
  +<tr>
     <td><code> torque.addSaveMethod </code></td>
     <td><code> true </code></td>
     <td>
  @@ -271,7 +279,7 @@
     <td><code> torque.complexObjectModel </code></td>
     <td><code> true </code></td>
     <td>
  -    If true, Torque generates data objects with collection support and 
  +    If true, Torque generates data objects with collection support and
       methods to easily retreive foreign key relationships.
     </td>
   </tr>
  @@ -280,7 +288,7 @@
     <td><code> false </code></td>
     <td>
       If true, Torque will not look in the <code>templatePath</code> directory,
  -    for templates, but instead load them from the classpath, allowing you to 
  +    for templates, but instead load them from the classpath, allowing you to
       use Torque without extracted it from the jar.
     </td>
   </tr>
  @@ -301,7 +309,7 @@
     <td><code> torque.idTableXMLFile </code></td>
     <td><code> N/A </code></td>
     <td>
  -    
  +
     </td>
   </tr>
   <tr>
  
  
  

--
To unsubscribe, e-mail:   <mailto:turbine-torque-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-dev-help@;jakarta.apache.org>

Reply via email to