mpoeschl    2002/06/24 11:12:20

  Modified:    src/java/org/apache/torque/adapter DB.java DBCloudscape.java
                        DBDB2App.java DBDB2Net.java DBFactory.java
                        DBHypersonicSQL.java DBInformix.java
                        DBInstantDB.java DBInterbase.java DBMM.java
                        DBNone.java DBOdbc.java DBOracle.java
                        DBPostgres.java DBSybase.java DBWeblogic.java
  Log:
  - code formatting
  - javadocs
  
  Revision  Changes    Path
  1.28      +15 -11    
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DB.java
  
  Index: DB.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DB.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DB.java   5 Jun 2002 00:56:10 -0000       1.27
  +++ DB.java   24 Jun 2002 18:12:19 -0000      1.28
  @@ -138,6 +138,8 @@
        * Returns the constant from the {@link
        * org.apache.torque.adapter.IDMethod} interface denoting which
        * type of primary key generation method this type of RDBMS uses.
  +     *
  +     * @return IDMethod constant
        */
       public abstract String getIDMethodType();
   
  @@ -174,22 +176,20 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @throws SQLException No Statement could be created or executed.
        */
  -    public abstract void lockTable(Connection con,
  -                                   String table)
  -        throws SQLException;
  +    public abstract void lockTable(Connection con, String table)
  +            throws SQLException;
   
       /**
        * Unlocks the specified table.
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @throws SQLException No Statement could be created or executed.
        */
  -    public abstract void unlockTable(Connection con,
  -                                     String table)
  -        throws SQLException;
  +    public abstract void unlockTable(Connection con, String table)
  +            throws SQLException;
   
       /**
        * This method is used to ignore case.
  @@ -223,6 +223,7 @@
       {
           JDBCDriver = newDriver;
       }
  +    */
   
       /**
        * This method is used to chek whether writing large objects to
  @@ -293,6 +294,7 @@
        * This method is used to format any date string.
        * Database can use different default date formats.
        *
  +     * @param dateString the date string to format
        * @return The proper date formated String.
        * @deprecated use getDateString(java.util.Date)
        */
  @@ -305,14 +307,15 @@
        * This method is used to format any date string.
        * Database can use different default date formats.
        *
  +     * @param date the Date to format
        * @return The proper date formatted String.
        */
       public String getDateString(Date date)
       {
           Timestamp ts = null;
  -        if ( date instanceof Timestamp )
  +        if (date instanceof Timestamp)
           {
  -            ts = (Timestamp)date;
  +            ts = (Timestamp) date;
           }
           else
           {
  @@ -325,6 +328,7 @@
       /**
        * This method is used to format a boolean string.
        *
  +     * @param b the Boolean to format
        * @return The proper date formatted String.
        */
       public String getBooleanString(Boolean b)
  
  
  
  1.4       +11 -16    
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBCloudscape.java
  
  Index: DBCloudscape.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBCloudscape.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DBCloudscape.java 21 May 2002 19:51:44 -0000      1.3
  +++ DBCloudscape.java 24 Jun 2002 18:12:19 -0000      1.4
  @@ -55,7 +55,6 @@
    */
   
   import java.sql.Connection;
  -import java.sql.DriverManager;
   import java.sql.SQLException;
   import java.util.StringTokenizer;
   
  @@ -65,8 +64,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>David Sean Taylor</a>
    * @version $Id$
    */
  -public class DBCloudscape
  -    extends DB
  +public class DBCloudscape extends DB
   {
       private static final String QUALIFIER = ".";
   
  @@ -114,9 +112,10 @@
           StringBuffer sql = new StringBuffer(132);
           sql.append("select distinct ConnectionInfo.lastAutoincrementValue(");
   
  -        String qualifiedIdentifier = (String)obj;
  +        String qualifiedIdentifier = (String) obj;
   
  -        StringTokenizer tokenizer = new StringTokenizer(qualifiedIdentifier, 
QUALIFIER);
  +        StringTokenizer tokenizer = new StringTokenizer(qualifiedIdentifier,
  +                QUALIFIER);
           int count = tokenizer.countTokens();
   
           String schema, table, column;
  @@ -126,7 +125,7 @@
           switch (count)
           {
           case 0:
  -            return ""; // not valid -- we need the column name and table name 
  +            return ""; // not valid -- we need the column name and table name
           case 1:
               return ""; // not valid -- we need the table name to select from
   
  @@ -155,7 +154,7 @@
           sql.append(column);
           sql.append("') FROM ");
           sql.append(table);
  -        
  +
           System.out.println(sql.toString());
           return sql.toString();
       }
  @@ -165,11 +164,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -178,11 +175,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  
  1.5       +8 -17     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBDB2App.java
  
  Index: DBDB2App.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBDB2App.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DBDB2App.java     15 Mar 2002 21:47:45 -0000      1.4
  +++ DBDB2App.java     24 Jun 2002 18:12:19 -0000      1.5
  @@ -68,8 +68,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Hakan Tandogan</a>
    * @version $Id$
    */
  -public class DBDB2App
  -    extends DB
  +public class DBDB2App extends DB
   {
       /**
        * Empty constructor.
  @@ -86,9 +85,7 @@
        */
       public String toUpperCase(String in)
       {
  -        String s =
  -            new StringBuffer("UPPER(").append(in).append(")").toString();
  -
  +        String s = new StringBuffer("UPPER(").append(in).append(")").toString();
           return s;
       }
   
  @@ -100,9 +97,7 @@
        */
       public String ignoreCase(String in)
       {
  -        String s =
  -            new StringBuffer("UPPER(").append(in).append(")").toString();
  -
  +        String s = new StringBuffer("UPPER(").append(in).append(")").toString();
           return s;
       }
   
  @@ -127,11 +122,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -140,11 +133,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  
  1.5       +7 -15     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBDB2Net.java
  
  Index: DBDB2Net.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBDB2Net.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DBDB2Net.java     15 Mar 2002 21:47:45 -0000      1.4
  +++ DBDB2Net.java     24 Jun 2002 18:12:19 -0000      1.5
  @@ -86,9 +86,7 @@
        */
       public String toUpperCase(String in)
       {
  -        String s =
  -            new StringBuffer("UPPER(").append(in).append(")").toString();
  -
  +        String s = new StringBuffer("UPPER(").append(in).append(")").toString();
           return s;
       }
   
  @@ -100,9 +98,7 @@
        */
       public String ignoreCase(String in)
       {
  -        String s =
  -            new StringBuffer("UPPER(").append(in).append(")").toString();
  -
  +        String s = new StringBuffer("UPPER(").append(in).append(")").toString();
           return s;
       }
   
  @@ -127,11 +123,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -140,11 +134,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  
  1.28      +6 -2      
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBFactory.java
  
  Index: DBFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBFactory.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DBFactory.java    21 May 2002 19:51:44 -0000      1.27
  +++ DBFactory.java    24 Jun 2002 18:12:19 -0000      1.28
  @@ -101,6 +101,8 @@
        * the "NO DATABASE" adapter to this list.  After all the
        * configuration is queried to get a list of JDBC drivers and
        * their associated adapters.
  +     *
  +     * @param configuration the configuration
        */
       public static void init(Configuration configuration)
       {
  @@ -118,7 +120,7 @@
               {
                   String mapKey = configuration.getString(key);
                   Class adapterClass = null;
  -                String adapterClassName = (String) adapterPackage + "." + 
  +                String adapterClassName = (String) adapterPackage + "." +
                       driverToAdapterMap.get(mapKey);
   
                   category.debug("Using " + adapterClassName);
  @@ -213,6 +215,8 @@
        * @param driver The fully-qualified name of the JDBC driver to
        * create a new adapter instance for or a shorter form adapter key.
        * @return An instance of a Turbine database adapter.
  +     * @throws InstantiationException throws if the JDBC driver could not be
  +     *      instantiated
        */
       public static DB create(String driver)
           throws InstantiationException
  
  
  
  1.7       +5 -9      
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBHypersonicSQL.java
  
  Index: DBHypersonicSQL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBHypersonicSQL.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DBHypersonicSQL.java      2 Jun 2002 15:36:23 -0000       1.6
  +++ DBHypersonicSQL.java      24 Jun 2002 18:12:19 -0000      1.7
  @@ -118,11 +118,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -131,11 +129,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  
  1.6       +9 -13     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBInformix.java
  
  Index: DBInformix.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBInformix.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DBInformix.java   12 Apr 2002 05:58:32 -0000      1.5
  +++ DBInformix.java   24 Jun 2002 18:12:19 -0000      1.6
  @@ -121,20 +121,18 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
           Statement statement = con.createStatement();
   
           StringBuffer stmt = new StringBuffer();
  -        stmt.append( "LOCK TABLE " )
  -        .append( table )
  -        .append( " IN EXCLUSIVE MODE" );
  +        stmt.append("LOCK TABLE ")
  +        .append(table)
  +        .append(" IN EXCLUSIVE MODE");
   
  -        statement.executeQuery( stmt.toString() );
  +        statement.executeQuery(stmt.toString());
       }
   
       /**
  @@ -142,11 +140,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
           // Tables in Informix are unlocked when a commit is issued.
           // The user may have issued a commit but do it here to be
  
  
  
  1.7       +5 -9      
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBInstantDB.java
  
  Index: DBInstantDB.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBInstantDB.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DBInstantDB.java  2 Jun 2002 15:36:23 -0000       1.6
  +++ DBInstantDB.java  24 Jun 2002 18:12:19 -0000      1.7
  @@ -121,11 +121,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -134,11 +132,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  
  1.6       +13 -18    
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBInterbase.java
  
  Index: DBInterbase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBInterbase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DBInterbase.java  12 Apr 2002 05:58:32 -0000      1.5
  +++ DBInterbase.java  24 Jun 2002 18:12:19 -0000      1.6
  @@ -64,8 +64,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Frank Conradie</a>
    * @version $Id$
    */
  -public class DBInterbase
  -    extends DB
  +public class DBInterbase extends DB
   {
       /**
        * This method is used to ignore case.
  @@ -134,23 +133,21 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
           Statement statement = con.createStatement();
   
           StringBuffer stmt = new StringBuffer();
  -        stmt.append( "SET TRANSACTION " )
  -        .append( "ISOLATION LEVEL READ COMMITTED " )
  -        .append( "NO RECORD_VERSION WAIT " )
  -        .append( "RESERVING " )
  -        .append( table )
  -        .append( " FOR PROTECTED WRITE" );
  +        stmt.append("SET TRANSACTION ")
  +                .append("ISOLATION LEVEL READ COMMITTED ")
  +                .append("NO RECORD_VERSION WAIT ")
  +                .append("RESERVING ")
  +                .append(table)
  +                .append(" FOR PROTECTED WRITE");
   
  -        statement.executeQuery( stmt.toString() );
  +        statement.executeQuery(stmt.toString());
       }
   
       /**
  @@ -158,11 +155,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
           // Tables in Interbase are unlocked when a commit is issued.
           // The user may have issued a commit but do it here to be
  
  
  
  1.10      +8 -13     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBMM.java
  
  Index: DBMM.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBMM.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DBMM.java 18 Mar 2002 07:53:25 -0000      1.9
  +++ DBMM.java 24 Jun 2002 18:12:19 -0000      1.10
  @@ -76,8 +76,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
    * @version $Id$
    */
  -public class DBMM
  -    extends DB
  +public class DBMM extends DB
   {
       private static final String DATE_FORMAT = "yyyyMMddHHmmss";
   
  @@ -135,17 +134,15 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException, No Statement could be created or
  +     * @exception SQLException No Statement could be created or
        * executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
           Statement statement = con.createStatement();
           StringBuffer stmt = new StringBuffer();
  -        stmt.append( "LOCK TABLE " ).append( table ).append( " WRITE" );
  -        statement.executeUpdate( stmt.toString() );
  +        stmt.append("LOCK TABLE ").append(table).append(" WRITE");
  +        statement.executeUpdate(stmt.toString());
       }
   
       /**
  @@ -156,12 +153,10 @@
        * @exception SQLException No Statement could be created or
        * executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
           Statement statement = con.createStatement();
  -        statement.executeUpdate( "UNLOCK TABLES" );
  +        statement.executeUpdate("UNLOCK TABLES");
       }
   
       /**
  
  
  
  1.5       +6 -11     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBNone.java
  
  Index: DBNone.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBNone.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DBNone.java       15 Mar 2002 21:47:45 -0000      1.4
  +++ DBNone.java       24 Jun 2002 18:12:19 -0000      1.5
  @@ -82,8 +82,7 @@
        * @return null.
        * @exception SQLException
        */
  -    public Connection getConnection()
  -        throws SQLException
  +    public Connection getConnection() throws SQLException
       {
           return null;
       }
  @@ -148,11 +147,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -161,11 +158,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  
  1.5       +5 -9      
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBOdbc.java
  
  Index: DBOdbc.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBOdbc.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DBOdbc.java       15 Mar 2002 21:47:45 -0000      1.4
  +++ DBOdbc.java       24 Jun 2002 18:12:19 -0000      1.5
  @@ -119,11 +119,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
           throw new SQLException("Not implemented.");
       }
  @@ -135,11 +133,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
           throw new SQLException("Not implemented.");
       }
  
  
  
  1.15      +8 -12     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBOracle.java
  
  Index: DBOracle.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBOracle.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DBOracle.java     2 Jun 2002 15:36:23 -0000       1.14
  +++ DBOracle.java     24 Jun 2002 18:12:19 -0000      1.15
  @@ -67,8 +67,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
    * @version $Id$
    */
  -public class DBOracle
  -    extends DB
  +public class DBOracle extends DB
   {
       /**
        * Empty constructor.
  @@ -132,18 +131,16 @@
        * @param table The name of the table to lock.
        * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
           Statement statement = con.createStatement();
   
           StringBuffer stmt = new StringBuffer();
  -        stmt.append( "SELECT next_id FROM " )
  -                .append( table )
  -                .append( " FOR UPDATE" );
  +        stmt.append("SELECT next_id FROM ")
  +                .append(table)
  +                .append(" FOR UPDATE");
   
  -        statement.executeQuery( stmt.toString() );
  +        statement.executeQuery(stmt.toString());
       }
   
       /**
  @@ -151,8 +148,7 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException No Statement could be created or
  -     * executed.
  +     * @exception SQLException No Statement could be created or executed.
        */
       public void unlockTable(Connection con, String table) throws SQLException
       {
  
  
  
  1.9       +6 -8      
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBPostgres.java
  
  Index: DBPostgres.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBPostgres.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DBPostgres.java   17 May 2002 17:04:19 -0000      1.8
  +++ DBPostgres.java   24 Jun 2002 18:12:19 -0000      1.9
  @@ -107,7 +107,7 @@
       }
   
       /**
  -     * @param name The name of the field (should be of type 
  +     * @param name The name of the field (should be of type
        *      <code>String</code>).
        * @return SQL to retreive the next database key.
        * @see org.apache.torque.adapter.DB#getIDMethodSQL(Object)
  @@ -134,10 +134,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con, String table)
  -            throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -146,10 +145,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @exception SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con, String table)
  -            throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   
  
  
  
  1.7       +10 -15    
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBSybase.java
  
  Index: DBSybase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBSybase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DBSybase.java     7 May 2002 17:28:49 -0000       1.6
  +++ DBSybase.java     24 Jun 2002 18:12:19 -0000      1.7
  @@ -69,8 +69,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jeff Brekke</a>
    * @version $Id$
    */
  -public class DBSybase
  -    extends DB
  +public class DBSybase extends DB
   {
       /**
        * Empty constructor.
  @@ -126,20 +125,18 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @throws SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
           Statement statement = con.createStatement();
   
           StringBuffer stmt = new StringBuffer();
  -        stmt.append( "SELECT next_id FROM " )
  -        .append( table )
  -        .append( " FOR UPDATE" );
  +        stmt.append("SELECT next_id FROM ")
  +        .append(table)
  +        .append(" FOR UPDATE");
   
  -        statement.executeQuery( stmt.toString() );
  +        statement.executeQuery(stmt.toString());
       }
   
       /**
  @@ -147,11 +144,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @throws SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
           // Tables in Sybase are unlocked when a commit is issued.  The
           // user may have issued a commit but do it here to be sure.
  
  
  
  1.8       +6 -10     
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBWeblogic.java
  
  Index: DBWeblogic.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBWeblogic.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DBWeblogic.java   21 May 2002 19:51:44 -0000      1.7
  +++ DBWeblogic.java   24 Jun 2002 18:12:19 -0000      1.8
  @@ -55,7 +55,6 @@
    */
   
   import java.sql.Connection;
  -import java.sql.DriverManager;
   import java.sql.SQLException;
   
   /**
  @@ -73,6 +72,7 @@
       protected DBWeblogic()
       {
       }
  +
       /**
        * This method is used to ignore case.
        *
  @@ -116,11 +116,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to lock.
  -     * @exception SQLException
  +     * @throws SQLException No Statement could be created or executed.
        */
  -    public void lockTable(Connection con,
  -                          String table)
  -        throws SQLException
  +    public void lockTable(Connection con, String table) throws SQLException
       {
       }
   
  @@ -129,11 +127,9 @@
        *
        * @param con The JDBC connection to use.
        * @param table The name of the table to unlock.
  -     * @exception SQLException
  +     * @throws SQLException No Statement could be created or executed.
        */
  -    public void unlockTable(Connection con,
  -                            String table)
  -        throws SQLException
  +    public void unlockTable(Connection con, String table) throws SQLException
       {
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to