You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by mp...@apache.org on 2002/03/01 15:16:02 UTC

cvs commit: jakarta-turbine-torque/src/templates/om Object.vm

mpoeschl    02/03/01 06:16:02

  Modified:    .        build-test.xml build.xml default.properties
                        deps.list
               src/java/org/apache/torque/engine/database/model
                        JavaNameGenerator.java Table.java
               src/java/org/apache/torque/om ComboKey.java
               src/java/org/apache/torque/task TorqueSQLExec.java
               src/java/org/apache/torque/util BasePeer.java Criteria.java
                        Query.java SqlExpression.java
               src/templates/om Object.vm
  Log:
  classes from commons-util have moved to commons-collections and commons-lang
  
  Revision  Changes    Path
  1.25      +3 -3      jakarta-turbine-torque/build-test.xml
  
  Index: build-test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/build-test.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- build-test.xml	22 Feb 2002 22:44:07 -0000	1.24
  +++ build-test.xml	1 Mar 2002 14:16:01 -0000	1.25
  @@ -255,7 +255,7 @@
       <pathelement location="${log4j.jar}"/>
       <pathelement location="${jdbc.jar}"/>
       <pathelement location="${commons-collections.jar}"/>
  -    <pathelement location="${commons-util.jar}"/>
  +    <pathelement location="${commons-lang.jar}"/>
       <pathelement location="${village.jar}"/>
       <pathelement location="${build.dest}"/>
       <pathelement location="${stratum.jar}"/>
  @@ -271,7 +271,7 @@
         ${log4j.jar}
         ${jdbc.jar}
         ${commons-collections.jar}
  -      ${commons-util.jar}
  +      ${commons-lang.jar}
         ${village.jar}
         ${build.dest}
         ${torque.destDir}
  @@ -304,7 +304,7 @@
       <copy file="${village.jar}" todir="${test.libDir}"/>
       <copy file="${log4j.jar}" todir="${test.libDir}"/>
       <copy file="${commons-collections.jar}" todir="${test.libDir}"/>
  -    <copy file="${commons-util.jar}" todir="${test.libDir}"/>
  +    <copy file="${commons-lang.jar}" todir="${test.libDir}"/>
       <copy file="${jdbc.jar}" todir="${test.libDir}"/>
       <copy file="${build.dir}/${torque.jar}" todir="${test.libDir}"/>
       <copy file="${torque.testDatabaseJar}" todir="${test.libDir}"/>
  
  
  
  1.36      +10 -10    jakarta-turbine-torque/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/build.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- build.xml	7 Feb 2002 14:17:43 -0000	1.35
  +++ build.xml	1 Mar 2002 14:16:01 -0000	1.36
  @@ -18,7 +18,7 @@
       <pathelement location="${jdbc.jar}"/>
       <pathelement location="${log4j.jar}"/>
       <pathelement location="${commons-collections.jar}"/>
  -    <pathelement location="${commons-util.jar}"/>
  +    <pathelement location="${commons-lang.jar}"/>
       <pathelement location="${junit.jar}"/>
       <pathelement location="${stratum.jar}"/>
       <pathelement location="tdk.jar"/>
  @@ -65,7 +65,7 @@
       <echo message="jdbc.jar = ${jdbc.jar}"/>
       <echo message="junit.jar = ${junit.jar}"/>
       <echo message="commons-collections.jar = ${commons-collections.jar}"/>
  -    <echo message="commons-util.jar = ${commons-util.jar}"/>
  +    <echo message="commons-lang.jar = ${commons-lang.jar}"/>
       <echo message="stratum.jar = ${stratum.jar}"/>
     </target>
   
  @@ -141,8 +141,8 @@
       />
   
       <available
  -      classname="org.apache.commons.util.exception.NestableException"
  -      property="commons-util.present"
  +      classname="org.apache.commons.lang.Strings"
  +      property="commons-lang.present"
         classpathref="classpath"
       />
   
  @@ -233,12 +233,12 @@
     </target>
   
     <target
  -    name="check.commons-util"
  -    unless="commons-util.present">
  +    name="check.commons-lang"
  +    unless="commons-lang.present">
   
       <antcall target="property-warning">
  -      <param name="name" value="commons-util.jar"/>
  -      <param name="value" value="${commons-util.jar}"/>
  +      <param name="name" value="commons-lang.jar"/>
  +      <param name="value" value="${commons-lang.jar}"/>
       </antcall>
     </target>
   
  @@ -287,7 +287,7 @@
     <target
       name="prepare"
       depends="init,check.velocity,check.xerces,check.village,
  -             check.log4j,check.commons-collections,check.commons-util,
  +             check.log4j,check.commons-collections,check.commons-lang,
                check.stratum,check.jdbc,env">
   
       <mkdir dir="${build.dir}"/>
  @@ -575,7 +575,7 @@
       <copy file="${village.jar}" todir="${torque.dir}/lib"/>
       <copy file="${log4j.jar}" todir="${torque.dir}/lib"/>
       <copy file="${commons-collections.jar}" todir="${torque.dir}/lib"/>
  -    <copy file="${commons-util.jar}" todir="${torque.dir}/lib"/>
  +    <copy file="${commons-lang.jar}" todir="${torque.dir}/lib"/>
       <copy file="${stratum.jar}" todir="${torque.dir}/lib"/>
       <copy file="${jdbc.jar}" todir="${torque.dir}/lib"/>
   
  
  
  
  1.17      +1 -1      jakarta-turbine-torque/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/default.properties,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- default.properties	1 Feb 2002 01:05:36 -0000	1.16
  +++ default.properties	1 Mar 2002 14:16:01 -0000	1.17
  @@ -52,7 +52,7 @@
   village.jar = ${lib.repo}/village-1.5.3-dev.jar
   log4j.jar = ${lib.repo}/log4j-1.1.3.jar
   commons-collections.jar = ${lib.repo}/commons-collections.jar
  -commons-util.jar = ${lib.repo}/commons-util-0.1-dev.jar
  +commons-lang.jar = ${lib.repo}/commons-lang-0.1-dev.jar
   jdbc.jar = ${lib.repo}/jdbc2_0-stdext.jar
   junit.jar = ${lib.repo}/junit-3.7.jar
   stratum.jar = ${lib.repo}/stratum-0.1-dev.jar
  
  
  
  1.5       +1 -1      jakarta-turbine-torque/deps.list
  
  Index: deps.list
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/deps.list,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- deps.list	7 Feb 2002 14:17:43 -0000	1.4
  +++ deps.list	1 Mar 2002 14:16:01 -0000	1.5
  @@ -1,5 +1,5 @@
   commons-collections.jar
  -commons-util-0.1-dev.jar
  +commons-lang-0.1-dev.jar
   jdbc2_0-stdext.jar
   junit-3.7.jar
   log4j-1.1.3.jar
  
  
  
  1.5       +5 -5      jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/JavaNameGenerator.java
  
  Index: JavaNameGenerator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/JavaNameGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavaNameGenerator.java	8 Nov 2001 17:20:52 -0000	1.4
  +++ JavaNameGenerator.java	1 Mar 2002 14:16:01 -0000	1.5
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,7 +57,7 @@
   import java.util.List;
   import java.util.StringTokenizer;
   
  -import org.apache.commons.util.StringUtils;
  +import org.apache.commons.lang.Strings;
   
   import org.apache.torque.Torque;
   import org.apache.torque.TorqueException;
  @@ -67,7 +67,7 @@
    *
    * @author <a href="mailto:dlr@finemaltcoding.com>Daniel Rall</a>
    * @author <a href="mailto:byron_foster@byron_foster@yahoo.com>Byron Foster</a>
  - * @version $Id: JavaNameGenerator.java,v 1.4 2001/11/08 17:20:52 mpoeschl Exp $
  + * @version $Id: JavaNameGenerator.java,v 1.5 2002/03/01 14:16:01 mpoeschl Exp $
    */
   public class JavaNameGenerator implements NameGenerator
   {
  @@ -135,7 +135,7 @@
           while (tok.hasMoreTokens())
           {
               String namePart = ((String) tok.nextElement()).toLowerCase();
  -            name.append(StringUtils.firstLetterCaps(namePart));
  +            name.append(Strings.firstLetterCaps(namePart));
           }
           return name.toString();
       }
  @@ -158,7 +158,7 @@
           while (tok.hasMoreTokens())
           {
               String namePart = (String) tok.nextElement();
  -            name.append(StringUtils.firstLetterCaps(namePart));
  +            name.append(Strings.firstLetterCaps(namePart));
           }
           return name.toString();
       }
  
  
  
  1.24      +6 -6      jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Table.java
  
  Index: Table.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Table.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Table.java	27 Dec 2001 20:49:33 -0000	1.23
  +++ Table.java	1 Mar 2002 14:16:01 -0000	1.24
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -59,7 +59,7 @@
   import java.util.Iterator;
   import java.util.List;
   
  -import org.apache.commons.util.StringUtils;
  +import org.apache.commons.lang.Strings;
   
   import org.apache.torque.TorqueException;
   import org.apache.torque.adapter.IDMethod;
  @@ -75,7 +75,7 @@
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
    * @author <a href="mailto:dlr@collab.net>Daniel Rall</a>
    * @author <a href="mailto:byron_foster@byron_foster@yahoo.com>Byron Foster</a>
  - * @version $Id: Table.java,v 1.23 2001/12/27 20:49:33 jmcnally Exp $
  + * @version $Id: Table.java,v 1.24 2002/03/01 14:16:01 mpoeschl Exp $
    */
   public class Table implements IDMethod
   {
  @@ -168,7 +168,7 @@
           basePeer = attrib.getValue("basePeer");
           alias = attrib.getValue("alias");
           heavyIndexing = "true".equals(attrib.getValue("heavyIndexing"))
  -            || (!"false".equals(attrib.getValue("heavyIndexing")) && 
  +            || (!"false".equals(attrib.getValue("heavyIndexing")) &&
                   getDatabase().isHeavyIndexing());
           description = attrib.getValue("description");
       }
  @@ -254,7 +254,7 @@
               {
                   ForeignKey fk = (ForeignKey) foreignKeys.get(i);
                   name = fk.getName();
  -                if (StringUtils.isEmpty(name))
  +                if (Strings.isEmpty(name))
                   {
                       name = acquireConstraintName("FK", i + 1);
                       fk.setName(name);
  @@ -265,7 +265,7 @@
               {
                   Index index = (Index) indices.get(i);
                   name = index.getName();
  -                if (StringUtils.isEmpty(name))
  +                if (Strings.isEmpty(name))
                   {
                       name = acquireConstraintName("I", i + 1);
                       index.setName(name);
  
  
  
  1.5       +4 -4      jakarta-turbine-torque/src/java/org/apache/torque/om/ComboKey.java
  
  Index: ComboKey.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/om/ComboKey.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ComboKey.java	27 Oct 2001 21:16:05 -0000	1.4
  +++ ComboKey.java	1 Mar 2002 14:16:01 -0000	1.5
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,7 +57,7 @@
   import java.util.ArrayList;
   
   import org.apache.torque.TorqueException;
  -import org.apache.commons.util.ObjectUtils;
  +import org.apache.commons.lang.Objects;
   
   /**
    * This class can be used as an ObjectKey to uniquely identify an
  @@ -315,7 +315,7 @@
                   isEqual = keys1.length == keys2.length;
                   for ( int i = 0; i < keys1.length && isEqual; i++)
                   {
  -                    isEqual &= ObjectUtils.equals(keys1[i], keys2[i]);
  +                    isEqual &= Objects.equals(keys1[i], keys2[i]);
                   }
               }
               else if ( keyObj instanceof SimpleKey[]
  @@ -326,7 +326,7 @@
                   isEqual = keys1.length == keys2.length;
                   for ( int i = 0; i < keys1.length && isEqual; i++)
                   {
  -                    isEqual &= ObjectUtils.equals(keys1[i], keys2[i]);
  +                    isEqual &= Objects.equals(keys1[i], keys2[i]);
                   }
               }
           }
  
  
  
  1.4       +3 -3      jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueSQLExec.java
  
  Index: TorqueSQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueSQLExec.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TorqueSQLExec.java	16 Feb 2002 16:58:38 -0000	1.3
  +++ TorqueSQLExec.java	1 Mar 2002 14:16:01 -0000	1.4
  @@ -80,7 +80,7 @@
   import java.sql.SQLException;
   import java.sql.SQLWarning;
   import java.sql.Statement;
  -import org.apache.commons.util.StringUtils;
  +import org.apache.commons.lang.Strings;
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  @@ -99,7 +99,7 @@
    * @author <a href="mailto:tim.stephenson@sybase.com">Tim Stephenson</A>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</A>
    * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
  - * @version $Id: TorqueSQLExec.java,v 1.3 2002/02/16 16:58:38 mpoeschl Exp $
  + * @version $Id: TorqueSQLExec.java,v 1.4 2002/03/01 14:16:01 mpoeschl Exp $
    */
   public class TorqueSQLExec extends Task
   {
  @@ -515,7 +515,7 @@
        */
       private void insertDatabaseSqlFiles(String url, String database, Vector transactions)
       {
  -        url = StringUtils.replace(url, "@DB@", database);
  +        url = Strings.replace(url, "@DB@", database);
           System.out.println("Our new url -> " + url);
   
           Driver driverInstance = null;
  
  
  
  1.26      +8 -8      jakarta-turbine-torque/src/java/org/apache/torque/util/BasePeer.java
  
  Index: BasePeer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/util/BasePeer.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- BasePeer.java	23 Feb 2002 05:49:20 -0000	1.25
  +++ BasePeer.java	1 Mar 2002 14:16:01 -0000	1.26
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -95,7 +95,7 @@
   import org.apache.torque.util.SqlExpression;
   
   //!! no good.
  -import org.apache.commons.util.StringStack;
  +import org.apache.commons.collections.StringStack;
   import org.apache.torque.TorqueException;
   import org.apache.log4j.Category;
   
  @@ -110,7 +110,7 @@
    * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
    * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
    * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
  - * @version $Id: BasePeer.java,v 1.25 2002/02/23 05:49:20 jmcnally Exp $
  + * @version $Id: BasePeer.java,v 1.26 2002/03/01 14:16:01 mpoeschl Exp $
    */
   public abstract class BasePeer implements java.io.Serializable
   {
  @@ -133,7 +133,7 @@
       /** Hashtable that contains the cached mapBuilders. */
       private static Hashtable mapBuilders = new Hashtable(5);
   
  -    protected static Category category = 
  +    protected static Category category =
           Category.getInstance(BasePeer.class.getName());
   
       /**
  @@ -750,10 +750,10 @@
           }
           else
           {
  -            throw new Exception("Database insert attempted without " + 
  +            throw new Exception("Database insert attempted without " +
                   "anything specified to insert");
           }
  -        
  +
           DatabaseMap dbMap = Torque.getDatabaseMap( criteria.getDbName() );
           TableMap tableMap = dbMap.getTable(tableName);
           Object keyInfo = tableMap.getPrimaryKeyMethodInfo();
  @@ -773,7 +773,7 @@
           {
               if (keyGen == null)
               {
  -                throw new Exception("IdGenerator for table '" + tableName + 
  +                throw new Exception("IdGenerator for table '" + tableName +
                                       "' is null");
               }
               // If the keyMethod is SEQUENCE or IDBROKERTABLE, get the id
  @@ -987,7 +987,7 @@
                   // functions may contain qualifiers so only take the last
                   // word as the table name.
                   int lastSpace = tableName.lastIndexOf(' ');
  -                if ( lastSpace != -1 ) 
  +                if ( lastSpace != -1 )
                   {
                       tableName = tableName.substring(lastSpace+1);
                   }
  
  
  
  1.13      +10 -10    jakarta-turbine-torque/src/java/org/apache/torque/util/Criteria.java
  
  Index: Criteria.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/util/Criteria.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Criteria.java	1 Mar 2002 01:49:15 -0000	1.12
  +++ Criteria.java	1 Mar 2002 14:16:01 -0000	1.13
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -76,7 +76,7 @@
   import org.apache.torque.om.DateKey;
   import org.apache.torque.om.ObjectKey;
   import org.apache.torque.util.BasePeer;
  -import org.apache.commons.util.StringStack;
  +import org.apache.commons.collections.StringStack;
   import org.apache.log4j.Category;
   
   /**
  @@ -92,7 +92,7 @@
    * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
    * @author <a href="mailto:eric@dobbse.net">Eric Dobbs</a>
    * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  - * @version $Id: Criteria.java,v 1.12 2002/03/01 01:49:15 dlr Exp $
  + * @version $Id: Criteria.java,v 1.13 2002/03/01 14:16:01 mpoeschl Exp $
    */
   public class Criteria extends Hashtable
   {
  @@ -226,7 +226,7 @@
       /**
        * Log4j category used for logging.
        */
  -    private static Category category = 
  +    private static Category category =
           Category.getInstance(Criteria.class.getName());
   
       /**
  @@ -417,11 +417,11 @@
               Criterion co = (Criterion)e.nextElement();
               String tableName = co.getTable();
               String tableName2 = getTableForAlias(tableName);
  -            if (tableName2 != null) 
  +            if (tableName2 != null)
               {
                   tableName = tableName2;
               }
  -            
  +
               if (!tables.contains(tableName))
               {
                   if (map.getTable(tableName).containsObjectColumn())
  @@ -3356,9 +3356,9 @@
           public DB getDb()
           {
               DB db = null;
  -            if ( this.db == null ) 
  +            if ( this.db == null )
               {
  -                // db may not be set if generating preliminary sql for 
  +                // db may not be set if generating preliminary sql for
                   // debugging.
                   try
                   {
  @@ -3372,11 +3372,11 @@
                          "Could not get a DB adapter, so sql may be wrong");
                   }
               }
  -            else 
  +            else
               {
                   db = this.db;
               }
  -            
  +
               return db;
           }
   
  
  
  
  1.4       +3 -3      jakarta-turbine-torque/src/java/org/apache/torque/util/Query.java
  
  Index: Query.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/util/Query.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Query.java	27 Oct 2001 21:11:07 -0000	1.3
  +++ Query.java	1 Mar 2002 14:16:02 -0000	1.4
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -54,7 +54,7 @@
    * <http://www.apache.org/>.
    */
   
  -import org.apache.commons.util.StringStack;
  +import org.apache.commons.collections.StringStack;
   
   /**
    * Used to assemble an SQL SELECT query.  Attributes exist for the
  @@ -64,7 +64,7 @@
    * is used primarily by BasePeer.
    *
    * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
  - * @version $Id: Query.java,v 1.3 2001/10/27 21:11:07 jvanzyl Exp $
  + * @version $Id: Query.java,v 1.4 2002/03/01 14:16:02 mpoeschl Exp $
    */
   public class Query
   {
  
  
  
  1.12      +4 -4      jakarta-turbine-torque/src/java/org/apache/torque/util/SqlExpression.java
  
  Index: SqlExpression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/util/SqlExpression.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SqlExpression.java	26 Feb 2002 17:51:18 -0000	1.11
  +++ SqlExpression.java	1 Mar 2002 14:16:02 -0000	1.12
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -62,7 +62,7 @@
   import org.apache.torque.om.DateKey;
   import org.apache.torque.om.ObjectKey;
   import org.apache.torque.om.StringKey;
  -import org.apache.commons.util.StringStack;
  +import org.apache.commons.collections.StringStack;
   
   /**
    * This class represents a part of an SQL query found in the <code>WHERE</code>
  @@ -77,7 +77,7 @@
    * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
    * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    * @author <a href="mailto:fedor@apache.org">Fedor Karpelevitch</a>
  - * @version $Id: SqlExpression.java,v 1.11 2002/02/26 17:51:18 dlr Exp $
  + * @version $Id: SqlExpression.java,v 1.12 2002/03/01 14:16:02 mpoeschl Exp $
    */
   public class SqlExpression
   {
  @@ -289,7 +289,7 @@
                  Date dt = (Date) criteria;
                  criteria = db.getDateString(dt);
              }
  -           else if ( criteria instanceof DateKey ) 
  +           else if ( criteria instanceof DateKey )
              {
                  Date dt = (Date) ((DateKey) criteria).getValue();
                  criteria = db.getDateString(dt);
  
  
  
  1.20      +4 -4      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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Object.vm	27 Feb 2002 06:15:42 -0000	1.19
  +++ Object.vm	1 Mar 2002 14:16:02 -0000	1.20
  @@ -20,7 +20,7 @@
   import org.apache.torque.util.Criteria;
   import org.apache.torque.pool.DBConnection;
   #if ($addSaveMethod)
  -import org.apache.commons.util.ObjectUtils;
  +import org.apache.commons.lang.Objects;
   #end
   #if ($addIntakeRetrievable)
   import org.apache.fulcrum.intake.Retrievable;
  @@ -141,7 +141,7 @@
           if (this.$clo != v)
           {
    #else
  -        if ( !ObjectUtils.equals(this.$clo, v) )
  +        if ( !Objects.equals(this.$clo, v) )
           {
    #end
               this.$clo = v;
  @@ -161,7 +161,7 @@
                 #set ( $varName = "a$tblFK.JavaName" )
               #end
   
  -        if ($varName != null &&  !ObjectUtils.equals(${varName}.get${colFK.JavaName}(), v) )
  +        if ($varName != null &&  !Objects.equals(${varName}.get${colFK.JavaName}(), v) )
           {
               $varName = null;
           }
  @@ -262,7 +262,7 @@
       #if ($cjtype == "short" || $cjtype == "int" || $cjtype == "long")
           #set ( $conditional = "$conditional${and}this.${clo}>0" )
       #else
  -        #set ( $conditional = "$conditional${and}!ObjectUtils.equals(this.${clo}, null)" )
  +        #set ( $conditional = "$conditional${and}!Objects.equals(this.${clo}, null)" )
       #end
       #set ( $arglist = "$arglist${comma}this.$clo" )
       #set ( $and = " && " )
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>