You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by ha...@apache.org on 2001/11/01 09:19:29 UTC

cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver AbstractDriver.java AvalonDBCallableStatement.java AvalonDBConnection.java AvalonDBDatabaseMetaData.java AvalonDBDriver.java AvalonDBDriverPropertyInfo.java AvalonDBPreparedStatement.java AvalonDBResultSet.java AvalonDBResultSetMetaData.java AvalonDBSQLWarning.java AvalonDBStatement.java AvalonDBTypeMap.java

hammant     01/11/01 00:19:29

  Modified:    apps/db/src/java/org/apache/avalon/db/driver
                        AbstractDriver.java AvalonDBCallableStatement.java
                        AvalonDBConnection.java
                        AvalonDBDatabaseMetaData.java AvalonDBDriver.java
                        AvalonDBDriverPropertyInfo.java
                        AvalonDBPreparedStatement.java
                        AvalonDBResultSet.java
                        AvalonDBResultSetMetaData.java
                        AvalonDBSQLWarning.java AvalonDBStatement.java
                        AvalonDBTypeMap.java
  Log:
  refactor of driver and renames
  
  Revision  Changes    Path
  1.3       +4 -4      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AbstractDriver.java
  
  Index: AbstractDriver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AbstractDriver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractDriver.java	2001/10/29 15:18:16	1.2
  +++ AbstractDriver.java	2001/11/01 08:19:28	1.3
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -24,7 +24,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class AbstractDriver {
   
  @@ -72,7 +72,7 @@
        *
        *
        * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  -     * @version $Revision: 1.2 $
  +     * @version $Revision: 1.3 $
        */
       private class StackTraceException extends Exception {}
   }
  
  
  
  1.3       +8 -12     jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBCallableStatement.java
  
  Index: AvalonDBCallableStatement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBCallableStatement.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AvalonDBCallableStatement.java	2001/10/31 16:17:38	1.2
  +++ AvalonDBCallableStatement.java	2001/11/01 08:19:28	1.3
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -41,24 +41,20 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
  + * @version $Revision: 1.3 $
    */
  -public class AvalonDBCallableStatement extends AbstractDriver implements CallableStatement {
  +public class AvalonDBCallableStatement extends AvalonDBStatement implements CallableStatement {
   
  -    private AvalonDBConnection mAvalonDBConnection;
       private String mSQL;
  -    private int mResultSetType;
  -    private int mResultSetConcurrency;
   
       public AvalonDBCallableStatement(AvalonDBConnection avalonDBConnection, String sql) {
  -        mAvalonDBConnection = avalonDBConnection;
  +        super(avalonDBConnection);
           mSQL = sql;
       }
       public AvalonDBCallableStatement(AvalonDBConnection avalonDBConnection, String sql, int resultSetType, int resultSetConcurrency) {
  -        mAvalonDBConnection = avalonDBConnection;
  -        mSQL = sql;
  -        mResultSetType = resultSetType;
  -        mResultSetConcurrency = resultSetConcurrency;
  +        super(avalonDBConnection,resultSetType,resultSetConcurrency);
  +                mSQL = sql;
       }
   
   
  
  
  
  1.4       +3 -3      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBConnection.java
  
  Index: AvalonDBConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBConnection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvalonDBConnection.java	2001/10/31 16:17:38	1.3
  +++ AvalonDBConnection.java	2001/11/01 08:19:28	1.4
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -42,7 +42,7 @@
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
    * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public abstract class AvalonDBConnection extends AbstractDriver implements Connection {
   
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDatabaseMetaData.java
  
  Index: AvalonDBDatabaseMetaData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDatabaseMetaData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDBDatabaseMetaData.java	2001/10/31 09:39:53	1.1
  +++ AvalonDBDatabaseMetaData.java	2001/11/01 08:19:28	1.2
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -21,7 +21,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class AvalonDBDatabaseMetaData extends AbstractDriver implements DatabaseMetaData {
   
  
  
  
  1.2       +3 -3      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDriver.java
  
  Index: AvalonDBDriver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDriver.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDBDriver.java	2001/10/31 09:39:53	1.1
  +++ AvalonDBDriver.java	2001/11/01 08:19:28	1.2
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -25,7 +25,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class
           AvalonDBDriver extends AbstractDriver implements Driver {
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDriverPropertyInfo.java
  
  Index: AvalonDBDriverPropertyInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBDriverPropertyInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDBDriverPropertyInfo.java	2001/10/31 09:39:53	1.1
  +++ AvalonDBDriverPropertyInfo.java	2001/11/01 08:19:28	1.2
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -18,7 +18,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class AvalonDBDriverPropertyInfo extends DriverPropertyInfo {
   
  
  
  
  1.3       +15 -21    jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBPreparedStatement.java
  
  Index: AvalonDBPreparedStatement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBPreparedStatement.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AvalonDBPreparedStatement.java	2001/10/31 16:17:38	1.2
  +++ AvalonDBPreparedStatement.java	2001/11/01 08:19:28	1.3
  @@ -1,25 +1,20 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
   package org.apache.avalon.db.driver;
   
  -
  -
   import org.apache.avalon.db.common.FeatureNotImplemented;
   
  -
  -
   import java.math.BigDecimal;
  -
   import java.io.InputStream;
   import java.io.Reader;
  -
   import java.util.Calendar;
  +import java.util.Hashtable;
   import java.sql.PreparedStatement;
   import java.sql.ResultSet;
   import java.sql.SQLException;
  @@ -40,26 +35,23 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
  + * @version $Revision: 1.3 $
    */
  -public class AvalonDBPreparedStatement extends AbstractDriver implements PreparedStatement {
  +public class AvalonDBPreparedStatement extends AvalonDBStatement implements PreparedStatement {
   
  -    private AvalonDBConnection mAvalonDBConnection;
       private String mSQL;
  -    private int mResultSetType;
  -    private int mResultSetConcurrency;
   
  -    public AvalonDBPreparedStatement(AvalonDBConnection apacheDBConnection, String sql) {
  -        mAvalonDBConnection = apacheDBConnection;
  +    public AvalonDBPreparedStatement(AvalonDBConnection avalonDBConnection, String sql) {
  +        super(avalonDBConnection);
           mSQL = sql;
       }
  -    public AvalonDBPreparedStatement(AvalonDBConnection apacheDBConnection, String sql, int resultSetType, int resultSetConcurrency) {
  -        mAvalonDBConnection = apacheDBConnection;
  -        mSQL = sql;
  -        mResultSetType = resultSetType;
  -        mResultSetConcurrency = resultSetConcurrency;
  +    public AvalonDBPreparedStatement(AvalonDBConnection avalonDBConnection, String sql, int resultSetType, int resultSetConcurrency) {
  +        super(avalonDBConnection,resultSetType,resultSetConcurrency);
  +                mSQL = sql;
       }
   
  +
       /**
        * Executes the SQL query in this <code>PreparedStatement</code> object
        * and returns the result set generated by the query.
  @@ -378,7 +370,9 @@
        * @param x the parameter value
        * @exception SQLException if a database access error occurs
        */
  -    public void setString(int parameterIndex, String x) throws SQLException {}
  +    public void setString(int parameterIndex, String x) throws SQLException {
  +        debug();
  +    }
   
       /**
        * Retrieves the first warning reported by calls on this <code>Statement</code> object.
  
  
  
  1.4       +5 -5      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBResultSet.java
  
  Index: AvalonDBResultSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBResultSet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AvalonDBResultSet.java	2001/10/31 16:17:38	1.3
  +++ AvalonDBResultSet.java	2001/11/01 08:19:28	1.4
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -44,7 +44,7 @@
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
    * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class AvalonDBResultSet extends AbstractDriver implements ResultSet {
   
  @@ -54,8 +54,8 @@
       private int mCursor = -1;
       private int mOffset = 0;
   
  -    public AvalonDBResultSet(AvalonDBConnection apacheDBConnection, RowSet rowSet) {
  -        mAvalonDBConnection = apacheDBConnection;
  +    public AvalonDBResultSet(AvalonDBConnection avalonDBConnection, RowSet rowSet) {
  +        mAvalonDBConnection = avalonDBConnection;
           mRowSet = rowSet;
       }
   
  
  
  
  1.2       +4 -4      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBResultSetMetaData.java
  
  Index: AvalonDBResultSetMetaData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBResultSetMetaData.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDBResultSetMetaData.java	2001/10/31 16:06:23	1.1
  +++ AvalonDBResultSetMetaData.java	2001/11/01 08:19:28	1.2
  @@ -1,7 +1,7 @@
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -25,8 +25,8 @@
       private AvalonDBConnection mAvalonDBConnection;
       private RowSet mRowSet;
        
  -    public AvalonDBResultSetMetaData(AvalonDBConnection apacheDBConnection, RowSet rowSet) {
  -        mAvalonDBConnection = apacheDBConnection;
  +    public AvalonDBResultSetMetaData(AvalonDBConnection avalonDBConnection, RowSet rowSet) {
  +        mAvalonDBConnection = avalonDBConnection;
           mRowSet = rowSet;
       }
   
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBSQLWarning.java
  
  Index: AvalonDBSQLWarning.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBSQLWarning.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDBSQLWarning.java	2001/10/31 09:39:53	1.1
  +++ AvalonDBSQLWarning.java	2001/11/01 08:19:28	1.2
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -18,6 +18,6 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class AvalonDBSQLWarning extends SQLWarning {}
  
  
  
  1.3       +17 -14    jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBStatement.java
  
  Index: AvalonDBStatement.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBStatement.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AvalonDBStatement.java	2001/10/31 16:17:39	1.2
  +++ AvalonDBStatement.java	2001/11/01 08:19:28	1.3
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -32,26 +32,29 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">g-froehlich@gmx.de</a>
  + * @version $Revision: 1.3 $
    */
   public class AvalonDBStatement extends AbstractDriver implements Statement {
   
  -    private AvalonDBConnection mAvalonDBConnection;
  -    private int mResultSetType;
  -    private int mResultSetConcurrency;
  -    private RowSet mRowSet;
  -    private AvalonDBResultSet mResultSet;
  -    private int mUpdateCount;
  +    protected AvalonDBConnection mAvalonDBConnection;
  +    protected int mResultSetType;
  +    protected int mResultSetConcurrency;
  +    protected RowSet mRowSet;
  +    protected AvalonDBResultSet mResultSet;
  +    protected int mUpdateCount;
   
  -    public AvalonDBStatement(AvalonDBConnection apacheDBConnection) {
  -        mAvalonDBConnection = apacheDBConnection;
  +    public AvalonDBStatement() {}
  +
  +    public AvalonDBStatement(AvalonDBConnection avalonDBConnection) {
  +        mAvalonDBConnection = avalonDBConnection;
       }
  -    public AvalonDBStatement(AvalonDBConnection apacheDBConnection, int resultSetType, int resultSetConcurrency) {
  -        mAvalonDBConnection = apacheDBConnection;
  +
  +    public AvalonDBStatement(AvalonDBConnection avalonDBConnection, int resultSetType, int resultSetConcurrency) {
  +        mAvalonDBConnection = avalonDBConnection;
           mResultSetType = resultSetType;
           mResultSetConcurrency = resultSetConcurrency;
       }
  -
   
       /**
        * Executes an SQL statement that returns a single <code>ResultSet</code> object.
  
  
  
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBTypeMap.java
  
  Index: AvalonDBTypeMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/AvalonDBTypeMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AvalonDBTypeMap.java	2001/10/31 09:39:53	1.1
  +++ AvalonDBTypeMap.java	2001/11/01 08:19:28	1.2
  @@ -1,8 +1,8 @@
   
   /*
  - * Copyright (C) The Apache Software Foundation. All rights reserved.
  + * Copyright (C) The avalon Software Foundation. All rights reserved.
    *
  - * This software is published under the terms of the Apache Software License
  + * This software is published under the terms of the avalon Software License
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    */
  @@ -20,7 +20,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class AvalonDBTypeMap implements Map {
   
  
  
  

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