avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/jdbc30 JDBC30ClueConnection.java
Date Mon, 26 Nov 2001 09:28:30 GMT
hammant     01/11/26 01:28:30

  Modified:    apps/db/src/java/org/apache/avalon/db/driver
                        AvalonDBCallableStatement.java
                        AvalonDBConnection.java
                        AvalonDBDatabaseMetaData.java
                        AvalonDBPreparedStatement.java
                        AvalonDBResultSet.java AvalonDBStatement.java
               apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client
                        CommandConnection.java
               apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue
                        GlueConnection.java
  Added:       apps/db/src/java/org/apache/avalon/db/driver
                        StatementFactory.java
               apps/db/src/java/org/apache/avalon/db/driver/jdbc2x
                        JDBC2xCallableStatement.java
                        JDBC2xPreparedStatement.java
                        JDBC2xStatementFactory.java
               apps/db/src/java/org/apache/avalon/db/driver/jdbc30
                        JDBC30CallableStatement.java
                        JDBC30PreparedStatement.java
                        JDBC30StatementFactory.java
               apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client/jdbc2x
                        JDBC2xCommandConnection.java
               apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client/jdbc30
                        JDBC30CommandConnection.java
               apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/jdbc2x
                        JDBC2xClueConnection.java
               apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/jdbc30
                        JDBC30ClueConnection.java
  Log:
  JDBC 2.x / 3.0 dual compatability
  
  Revision  Changes    Path
  1.5       +2 -2      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AvalonDBCallableStatement.java	2001/11/23 14:41:07	1.4
  +++ AvalonDBCallableStatement.java	2001/11/26 09:28:29	1.5
  @@ -42,9 +42,9 @@
    *
    * @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.4 $
  + * @version $Revision: 1.5 $
    */
  -public class AvalonDBCallableStatement extends AvalonDBStatement implements CallableStatement
{
  +public abstract class AvalonDBCallableStatement extends AvalonDBStatement implements CallableStatement
{
   
       private String mSQL;
   
  
  
  
  1.9       +17 -5     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AvalonDBConnection.java	2001/11/23 14:41:07	1.8
  +++ AvalonDBConnection.java	2001/11/26 09:28:29	1.9
  @@ -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.8 $
  + * @version $Revision: 1.9 $
    */
   public abstract class AvalonDBConnection extends AbstractDriver implements Connection {
   
  @@ -53,6 +53,8 @@
   
       protected abstract void initialize(String host, int port, String url, String[] options)
throws SQLException;
   
  +    protected StatementFactory mStatementFactory;
  +
       protected void setParserHelper(AbstractParserHelper parserHelper) {
           mAbstractParserHelper = parserHelper;
       }
  @@ -109,7 +111,7 @@
        * @exception SQLException if a database access error occurs
        */
       public PreparedStatement prepareStatement(String sql) throws SQLException {
  -        return new AvalonDBPreparedStatement(this, sql);
  +        return mStatementFactory.makePreparedStatment(this, sql);
       }
   
       /**
  @@ -140,7 +142,7 @@
        * @exception SQLException if a database access error occurs
        */
       public CallableStatement prepareCall(String sql) throws SQLException {
  -        return new AvalonDBCallableStatement(this,sql);
  +        return mStatementFactory.makeCallableStatment(this, sql);
       }
   
       /**
  @@ -430,7 +432,7 @@
        */
       public PreparedStatement prepareStatement(
               String sql, int resultSetType, int resultSetConcurrency) throws SQLException
{
  -        return new AvalonDBPreparedStatement(this,sql,resultSetType,resultSetConcurrency);
  +        return mStatementFactory.makePreparedStatment(this,sql,resultSetType,resultSetConcurrency);
       }
   
       /**
  @@ -453,7 +455,7 @@
        */
       public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
               throws SQLException {
  -        return new AvalonDBCallableStatement(this,sql,resultSetType,resultSetConcurrency);
  +        return mStatementFactory.makeCallableStatment(this, sql, resultSetType, resultSetConcurrency);
       }
   
       /**
  @@ -485,4 +487,14 @@
       public void setTypeMap(Map map) throws SQLException {
           debug();
       }
  +
  +    public void setHoldability(int i) throws SQLException {
  +        debug();
  +    }
  +    public int getHoldability() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +
   }
  
  
  
  1.3       +76 -1     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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AvalonDBDatabaseMetaData.java	2001/11/01 08:19:28	1.2
  +++ AvalonDBDatabaseMetaData.java	2001/11/26 09:28:29	1.3
  @@ -21,7 +21,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 AvalonDBDatabaseMetaData extends AbstractDriver implements DatabaseMetaData
{
   
  @@ -3052,7 +3052,82 @@
       public Connection getConnection() throws SQLException {
   
           debug();
  +        return null;
  +    }
  +
  +    public boolean supportsSavepoints() throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public boolean supportsNamedParameters() throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public boolean supportsMultipleOpenResults() {
  +        debug();
  +        return false;
  +    }
  +
  +    public boolean supportsGetGeneratedKeys() throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public ResultSet getSuperTypes(String s, String s1, String s2) throws SQLException
{
  +        debug();
  +        return null;
  +    }
   
  +    public ResultSet getSuperTables(String s, String s1, String s2) throws SQLException
{
  +        debug();
           return null;
       }
  +
  +    public ResultSet getAttributes(String s, String s1, String s2, String s3) throws SQLException
{
  +        debug();
  +        return null;
  +    }
  +
  +    public boolean supportsResultSetHoldability(int i) throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public int getResultSetHoldability() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int getDatabaseMajorVersion() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int getDatabaseMinorVersion() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int getJDBCMajorVersion() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int getJDBCMinorVersion() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int getSQLStateType() throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public boolean locatorsUpdateCopy() throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
   }
  
  
  
  1.7       +4 -2      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AvalonDBPreparedStatement.java	2001/11/23 14:41:07	1.6
  +++ AvalonDBPreparedStatement.java	2001/11/26 09:28:29	1.7
  @@ -31,6 +31,7 @@
   import java.sql.Clob;
   import java.sql.Array;
   import java.sql.ResultSetMetaData;
  +import java.net.URL;
   
   /**
    * Class AvalonDBPreparedStatement
  @@ -38,9 +39,9 @@
    *
    * @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.6 $
  + * @version $Revision: 1.7 $
    */
  -public class AvalonDBPreparedStatement extends AvalonDBStatement implements PreparedStatement
{
  +public abstract class AvalonDBPreparedStatement extends AvalonDBStatement implements PreparedStatement
{
   
       private String mSQL = null;
       private String[] params = null;
  @@ -1210,4 +1211,5 @@
               return true;
           }   
       }
  +
   }
  
  
  
  1.9       +153 -1    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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AvalonDBResultSet.java	2001/11/23 14:41:07	1.8
  +++ AvalonDBResultSet.java	2001/11/26 09:28:29	1.9
  @@ -31,6 +31,7 @@
   import java.io.Reader;
   import java.util.Map;
   import java.util.Calendar;
  +import java.net.URL;
   
   
   /**
  @@ -39,7 +40,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.8 $
  + * @version $Revision: 1.9 $
    */
   public class AvalonDBResultSet extends AbstractDriver implements ResultSet {
   
  @@ -2810,7 +2811,158 @@
       public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
{
   
           debug();
  +        return null;
  +    }
   
  +    public URL getURL(int columnIndex) throws SQLException {
  +        debug();
  +        return null;
  +    }
  +
  +    /**
  +     * Retrieves the value of the designated column in the current row
  +     * of this <code>ResultSet</code> object as a <code>java.net.URL</code>
  +     * object in the Java programming language.
  +     *
  +     * @param columnName the SQL name of the column
  +     * @return the column value as a <code>java.net.URL</code> object;
  +     * if the value is SQL <code>NULL</code>,
  +     * the value returned is <code>null</code> in the Java programming language
  +     * @exception SQLException if a database access error occurs
  +     *            or if a URL is malformed
  +     * @since 1.4
  +     */
  +    public URL getURL(String columnName) throws SQLException {
  +        debug();
           return null;
       }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Ref</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnIndex the first column is 1, the second is 2, ...
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateRef(int columnIndex, java.sql.Ref x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Ref</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnName the name of the column
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateRef(String columnName, Ref x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Blob</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnIndex the first column is 1, the second is 2, ...
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateBlob(int columnIndex, java.sql.Blob x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Blob</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnName the name of the column
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateBlob(String columnName, java.sql.Blob x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Clob</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnIndex the first column is 1, the second is 2, ...
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateClob(int columnIndex, java.sql.Clob x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Clob</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnName the name of the column
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateClob(String columnName, java.sql.Clob x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Array</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnIndex the first column is 1, the second is 2, ...
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateArray(int columnIndex, java.sql.Array x) throws SQLException {
  +        debug();
  +    }
  +
  +    /**
  +     * Updates the designated column with a <code>java.sql.Array</code> value.
  +     * The updater methods are used to update column values in the
  +     * current row or the insert row.  The updater methods do not
  +     * update the underlying database; instead the <code>updateRow</code> or
  +     * <code>insertRow</code> methods are called to update the database.
  +     *
  +     * @param columnName the name of the column
  +     * @param x the new column value
  +     * @exception SQLException if a database access error occurs
  +     * @since 1.4
  +     */
  +    public void updateArray(String columnName, java.sql.Array x) throws SQLException {
  +        debug();
  +    }
  +
   }
  
  
  
  1.11      +53 -1     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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AvalonDBStatement.java	2001/11/23 14:41:07	1.10
  +++ AvalonDBStatement.java	2001/11/26 09:28:29	1.11
  @@ -28,6 +28,7 @@
   import java.sql.SQLException;
   import java.sql.SQLWarning;
   import java.sql.Connection;
  +import java.net.URL;
   
   
   /**
  @@ -36,7 +37,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.10 $
  + * @version $Revision: 1.11 $
    */
   public class AvalonDBStatement extends AbstractDriver implements Statement {
   
  @@ -653,6 +654,57 @@
       private Request getRequest(String sql) throws SQLException {
           // LXSQL or SQL syntax
           return mAvalonDBConnection.getParserHelper().getRequest(sql);
  +    }
  +
  +    // jdbc 3.0
  +    public void setURL(int i, URL url) throws SQLException {
  +        debug();
  +    }
  +
  +    // jdbc 3.0
  +    public boolean getMoreResults(int i) throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public ResultSet getGeneratedKeys() throws SQLException {
  +        debug();
  +        return null;
  +    }
  +
  +    public int executeUpdate(String s, int i) throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int executeUpdate(String s, int[] ints) throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public int executeUpdate(String s, String[] strings) throws SQLException {
  +        debug();
  +        return 0;
  +    }
  +
  +    public boolean execute(String s, int i) throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public boolean execute(String s, int[] ints) throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public boolean execute(String s, String[] strings) throws SQLException {
  +        debug();
  +        return false;
  +    }
  +
  +    public int getResultSetHoldability() throws SQLException {
  +        debug();
  +        return 0;
       }
   
   }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/StatementFactory.java
  
  Index: StatementFactory.java
  ===================================================================
  /*
   * Copyright (C) The avalon Software Foundation. All rights reserved.
   *
   * 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 java.sql.SQLException;
  
  public abstract class StatementFactory {
  
      protected abstract AvalonDBCallableStatement makeCallableStatment(AvalonDBConnection
avalonDBConnection, String sql) throws SQLException;
      protected abstract AvalonDBCallableStatement makeCallableStatment(AvalonDBConnection
avalonDBConnection, String sql, int resultSetType, int resultSetConcurrency) throws SQLException;
      protected abstract AvalonDBPreparedStatement makePreparedStatment(AvalonDBConnection
avalonDBConnection, String sql) throws SQLException;
      protected abstract AvalonDBPreparedStatement makePreparedStatment(AvalonDBConnection
avalonDBConnection, String sql, int resultSetType, int resultSetConcurrency) throws SQLException;
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/jdbc2x/JDBC2xCallableStatement.java
  
  Index: JDBC2xCallableStatement.java
  ===================================================================
  
  /*
   * Copyright (C) The avalon Software Foundation. All rights reserved.
   *
   * 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.jdbc2x;
  
  import org.apache.avalon.db.driver.AvalonDBCallableStatement;
  import org.apache.avalon.db.driver.AvalonDBConnection;
  
  import java.sql.SQLException;
  
  public class JDBC2xCallableStatement extends AvalonDBCallableStatement {
  
      public JDBC2xCallableStatement(AvalonDBConnection avalonDBConnection, String sql) throws
SQLException {
          super(avalonDBConnection, sql);
      }
  
      public JDBC2xCallableStatement(AvalonDBConnection avalonDBConnection, String sql, int
resultSetType, int resultSetConcurrency) throws SQLException {
          super(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/jdbc2x/JDBC2xPreparedStatement.java
  
  Index: JDBC2xPreparedStatement.java
  ===================================================================
  
  /*
   * Copyright (C) The avalon Software Foundation. All rights reserved.
   *
   * 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.jdbc2x;
  
  import org.apache.avalon.db.driver.AvalonDBConnection;
  import org.apache.avalon.db.driver.AvalonDBPreparedStatement;
  
  import java.sql.SQLException;
  
  public class JDBC2xPreparedStatement extends AvalonDBPreparedStatement {
  
      public JDBC2xPreparedStatement(AvalonDBConnection avalonDBConnection, String sql) throws
SQLException {
          super(avalonDBConnection, sql);
      }
  
      public JDBC2xPreparedStatement(AvalonDBConnection avalonDBConnection, String sql, int
resultSetType, int resultSetConcurrency) throws SQLException {
          super(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/jdbc2x/JDBC2xStatementFactory.java
  
  Index: JDBC2xStatementFactory.java
  ===================================================================
  /*
   * Created by IntelliJ IDEA.
   * User: Administrator
   * Date: Nov 26, 2001
   * Time: 9:11:43 AM
   * To change template for new class use 
   * Code Style | Class Templates options (Tools | IDE Options).
   */
  package org.apache.avalon.db.driver.jdbc2x;
  
  import org.apache.avalon.db.driver.StatementFactory;
  import org.apache.avalon.db.driver.AvalonDBCallableStatement;
  import org.apache.avalon.db.driver.AvalonDBConnection;
  import org.apache.avalon.db.driver.AvalonDBPreparedStatement;
  
  import java.sql.SQLException;
  
  public class JDBC2xStatementFactory extends StatementFactory {
  
      protected AvalonDBCallableStatement makeCallableStatment(AvalonDBConnection avalonDBConnection,
String sql) throws SQLException {
          return new JDBC2xCallableStatement(avalonDBConnection, sql);
      }
  
      protected AvalonDBCallableStatement makeCallableStatment(AvalonDBConnection avalonDBConnection,
String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
          return new JDBC2xCallableStatement(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  
      protected AvalonDBPreparedStatement makePreparedStatment(AvalonDBConnection avalonDBConnection,
String sql) throws SQLException {
          return new JDBC2xPreparedStatement(avalonDBConnection, sql);
      }
  
      protected AvalonDBPreparedStatement makePreparedStatment(AvalonDBConnection avalonDBConnection,
String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
          return new JDBC2xPreparedStatement(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/jdbc30/JDBC30CallableStatement.java
  
  Index: JDBC30CallableStatement.java
  ===================================================================
  
  /*
   * Copyright (C) The avalon Software Foundation. All rights reserved.
   *
   * 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.jdbc30;
  
  import org.apache.avalon.db.driver.AvalonDBCallableStatement;
  import org.apache.avalon.db.driver.AvalonDBConnection;
  
  import java.sql.SQLException;
  import java.sql.ParameterMetaData;
  import java.sql.Date;
  import java.sql.Time;
  import java.sql.Timestamp;
  import java.sql.Ref;
  import java.sql.Blob;
  import java.sql.Clob;
  import java.sql.Array;
  import java.net.URL;
  import java.math.BigDecimal;
  import java.io.InputStream;
  import java.io.Reader;
  import java.util.Calendar;
  import java.util.Map;
  
  public class JDBC30CallableStatement extends AvalonDBCallableStatement {
  
      public JDBC30CallableStatement(AvalonDBConnection avalonDBConnection, String sql) throws
SQLException {
          super(avalonDBConnection, sql);
      }
  
      public JDBC30CallableStatement(AvalonDBConnection avalonDBConnection, String sql, int
resultSetType, int resultSetConcurrency) throws SQLException {
          super(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  
      public ParameterMetaData getParameterMetaData() throws SQLException {
          debug();
          return null;
      }
  
      public void registerOutParameter(String s, int i) throws SQLException {
          debug();
      }
  
      public void registerOutParameter(String s, int i, int i1) throws SQLException {
          debug();
      }
  
      public void registerOutParameter(String s, int i, String s1) throws SQLException {
          debug();
      }
  
      public URL getURL(int i) throws SQLException {
          debug();
          return null;
      }
  
      public void setURL(String s, URL url) throws SQLException {
          debug();
      }
  
      public void setNull(String s, int i) throws SQLException {
          debug();
      }
  
      public void setBoolean(String s, boolean b) throws SQLException {
          debug();
      }
  
      public void setByte(String s, byte b) throws SQLException {
          debug();
      }
  
      public void setShort(String s, short i) throws SQLException {
          debug();
      }
  
      public void setInt(String s, int i) throws SQLException {
          debug();
      }
  
      public void setLong(String s, long l) throws SQLException {
          debug();
      }
  
      public void setFloat(String s, float v) throws SQLException {
          debug();
      }
  
      public void setDouble(String s, double v) throws SQLException {
          debug();
      }
  
      public void setBigDecimal(String s, BigDecimal decimal) throws SQLException {
          debug();
      }
  
      public void setString(String s, String s1) throws SQLException {
          debug();
      }
  
      public void setBytes(String s, byte[] bytes) throws SQLException {
          debug();
      }
  
      public void setDate(String s, Date date) throws SQLException {
          debug();
      }
  
      public void setTime(String s, Time time) throws SQLException {
          debug();
      }
  
      public void setTimestamp(String s, Timestamp timestamp) throws SQLException {
          debug();
      }
  
      public void setAsciiStream(String s, InputStream stream, int i) throws SQLException
{
          debug();
      }
  
      public void setBinaryStream(String s, InputStream stream, int i) throws SQLException
{
          debug();
      }
  
      public void setObject(String s, Object o, int i, int i1) throws SQLException {
          debug();
      }
  
      public void setObject(String s, Object o, int i) throws SQLException {
          debug();
      }
  
      public void setObject(String s, Object o) throws SQLException {
          debug();
      }
  
      public void setCharacterStream(String s, Reader reader, int i) throws SQLException {
          debug();
      }
  
      public void setDate(String s, Date date, Calendar calendar) throws SQLException {
          debug();
      }
  
      public void setTime(String s, Time time, Calendar calendar) throws SQLException {
          debug();
      }
  
      public void setTimestamp(String s, Timestamp timestamp, Calendar calendar) throws SQLException
{
          debug();
      }
  
      public String getString(String s) throws SQLException {
          debug();
          return null;
      }
  
      public boolean getBoolean(String s) throws SQLException {
          debug();
          return false;
      }
  
      public byte getByte(String s) throws SQLException {
          debug();
          return 0;
      }
  
      public short getShort(String s) throws SQLException {
          debug();
          return 0;
      }
  
      public int getInt(String s) throws SQLException {
          debug();
          return 0;
      }
  
      public long getLong(String s) throws SQLException {
          debug();
          return 0;
      }
  
      public float getFloat(String s) throws SQLException {
          debug();
          return 0;
      }
  
      public double getDouble(String s) throws SQLException {
          debug();
          return 0;
      }
  
      public byte[] getBytes(String s) throws SQLException {
          debug();
          return new byte[0];
      }
  
      public Date getDate(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Time getTime(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Timestamp getTimestamp(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Object getObject(String s) throws SQLException {
          debug();
          return null;
      }
  
      public BigDecimal getBigDecimal(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Object getObject(String s, Map map) throws SQLException {
          debug();
          return null;
      }
  
      public Ref getRef(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Blob getBlob(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Clob getClob(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Array getArray(String s) throws SQLException {
          debug();
          return null;
      }
  
      public Date getDate(String s, Calendar calendar) throws SQLException {
          debug();
          return null;
      }
  
      public Time getTime(String s, Calendar calendar) throws SQLException {
          debug();
          return null;
      }
  
      public Timestamp getTimestamp(String s, Calendar calendar) throws SQLException {
          debug();
          return null;
      }
  
      public URL getURL(String s) throws SQLException {
          debug();
          return null;
      }
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/jdbc30/JDBC30PreparedStatement.java
  
  Index: JDBC30PreparedStatement.java
  ===================================================================
  
  /*
   * Copyright (C) The avalon Software Foundation. All rights reserved.
   *
   * 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.jdbc30;
  
  import org.apache.avalon.db.driver.AvalonDBConnection;
  import org.apache.avalon.db.driver.AvalonDBPreparedStatement;
  
  import java.sql.SQLException;
  import java.sql.ParameterMetaData;
  
  
  public class JDBC30PreparedStatement extends AvalonDBPreparedStatement {
  
      public JDBC30PreparedStatement(AvalonDBConnection avalonDBConnection, String sql) throws
SQLException {
          super(avalonDBConnection, sql);
      }
  
      public JDBC30PreparedStatement(AvalonDBConnection avalonDBConnection, String sql, int
resultSetType, int resultSetConcurrency) throws SQLException {
          super(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  
      public ParameterMetaData getParameterMetaData() throws SQLException {
          debug();
          return null;
      }
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/driver/jdbc30/JDBC30StatementFactory.java
  
  Index: JDBC30StatementFactory.java
  ===================================================================
  /*
   * Created by IntelliJ IDEA.
   * User: Administrator
   * Date: Nov 26, 2001
   * Time: 9:11:43 AM
   * To change template for new class use 
   * Code Style | Class Templates options (Tools | IDE Options).
   */
  package org.apache.avalon.db.driver.jdbc30;
  
  import org.apache.avalon.db.driver.StatementFactory;
  import org.apache.avalon.db.driver.AvalonDBCallableStatement;
  import org.apache.avalon.db.driver.AvalonDBConnection;
  import org.apache.avalon.db.driver.AvalonDBPreparedStatement;
  import org.apache.avalon.db.driver.jdbc2x.JDBC2xPreparedStatement;
  
  import java.sql.SQLException;
  
  public class JDBC30StatementFactory extends StatementFactory {
  
      protected AvalonDBCallableStatement makeCallableStatment(AvalonDBConnection avalonDBConnection,
String sql) throws SQLException {
          return new JDBC30CallableStatement(avalonDBConnection, sql);
      }
  
      protected AvalonDBCallableStatement makeCallableStatment(AvalonDBConnection avalonDBConnection,
String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
          return new JDBC30CallableStatement(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  
      protected AvalonDBPreparedStatement makePreparedStatment(AvalonDBConnection avalonDBConnection,
String sql) throws SQLException {
          return new JDBC30PreparedStatement(avalonDBConnection, sql);
      }
  
      protected AvalonDBPreparedStatement makePreparedStatment(AvalonDBConnection avalonDBConnection,
String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
          return new JDBC30PreparedStatement(avalonDBConnection, sql, resultSetType, resultSetConcurrency);
      }
  }
  
  
  
  1.12      +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client/CommandConnection.java
  
  Index: CommandConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client/CommandConnection.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CommandConnection.java	2001/11/23 13:32:32	1.11
  +++ CommandConnection.java	2001/11/26 09:28:30	1.12
  @@ -34,9 +34,9 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.11 $
  + * @version $Revision: 1.12 $
    */
  -public class CommandConnection extends AvalonDBConnection {
  +public abstract class CommandConnection extends AvalonDBConnection {
   
       private String mHost;
       private int mPort;
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client/jdbc2x/JDBC2xCommandConnection.java
  
  Index: JDBC2xCommandConnection.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.transport.cmdstream.client.jdbc2x;
  
  import org.apache.avalon.db.transport.cmdstream.client.CommandConnection;
  import org.apache.avalon.db.driver.jdbc2x.JDBC2xStatementFactory;
  
  import java.sql.SQLException;
  
  public class JDBC2xCommandConnection extends CommandConnection {
  
      public JDBC2xCommandConnection() throws SQLException {
          mStatementFactory = new JDBC2xStatementFactory();
      }
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/cmdstream/client/jdbc30/JDBC30CommandConnection.java
  
  Index: JDBC30CommandConnection.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.transport.cmdstream.client.jdbc30;
  
  import org.apache.avalon.db.transport.cmdstream.client.CommandConnection;
  import org.apache.avalon.db.driver.jdbc30.JDBC30StatementFactory;
  
  import java.sql.Savepoint;
  import java.sql.SQLException;
  import java.sql.Statement;
  import java.sql.PreparedStatement;
  import java.sql.CallableStatement;
  
  public class JDBC30CommandConnection extends CommandConnection {
  
      public JDBC30CommandConnection() throws SQLException {
          mStatementFactory = new JDBC30StatementFactory();
      }
  
      public Savepoint setSavepoint() throws SQLException {
          debug();
          return null;
      }
  
      public Savepoint setSavepoint(String s) throws SQLException {
          debug();
          return null;
      }
  
      public void rollback(Savepoint savepoint) throws SQLException {
          debug();
      }
  
      public void releaseSavepoint(Savepoint savepoint) throws SQLException {
          debug();
      }
  
      public Statement createStatement(int i, int i1, int i2) throws SQLException {
          debug();
          return null;
      }
  
  
      public PreparedStatement prepareStatement(String s, int i, int i1, int i2) throws SQLException
{
          debug();
          return null;
      }
  
      public CallableStatement prepareCall(String s, int i, int i1, int i2) throws SQLException
{
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, int i) throws SQLException {
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, int[] ints) throws SQLException
{
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, String[] strings) throws SQLException
{
          debug();
          return null;
      }
  
  
  }
  
  
  
  1.5       +2 -2      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/GlueConnection.java
  
  Index: GlueConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/GlueConnection.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GlueConnection.java	2001/11/15 14:29:58	1.4
  +++ GlueConnection.java	2001/11/26 09:28:30	1.5
  @@ -27,9 +27,9 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
  -public class GlueConnection extends AvalonDBConnection {
  +public abstract class GlueConnection extends AvalonDBConnection {
   
   
       private DatabaseManager mDBManager;
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/jdbc2x/JDBC2xClueConnection.java
  
  Index: JDBC2xClueConnection.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.transport.soap.client.glue.jdbc2x;
  
  import org.apache.avalon.db.transport.soap.client.glue.GlueConnection;
  import org.apache.avalon.db.driver.jdbc2x.JDBC2xStatementFactory;
  
  import java.sql.SQLException;
  
  public class JDBC2xClueConnection extends GlueConnection {
  
      public JDBC2xClueConnection() throws SQLException {
          mStatementFactory = new JDBC2xStatementFactory();
      }
  
  }
  
  
  
  1.1                  jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/transport/soap/client/glue/jdbc30/JDBC30ClueConnection.java
  
  Index: JDBC30ClueConnection.java
  ===================================================================
  
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.db.transport.soap.client.glue.jdbc30;
  
  import org.apache.avalon.db.transport.soap.client.glue.GlueConnection;
  import org.apache.avalon.db.driver.jdbc30.JDBC30StatementFactory;
  
  import java.sql.Savepoint;
  import java.sql.SQLException;
  import java.sql.Statement;
  import java.sql.PreparedStatement;
  import java.sql.CallableStatement;
  
  public class JDBC30ClueConnection extends GlueConnection {
  
      public JDBC30ClueConnection() throws SQLException {
          mStatementFactory = new JDBC30StatementFactory();
      }
  
      public Savepoint setSavepoint() throws SQLException {
          debug();
          return null;
      }
  
      public Savepoint setSavepoint(String s) throws SQLException {
          debug();
          return null;
      }
  
      public void rollback(Savepoint savepoint) throws SQLException {
          debug();
      }
  
      public void releaseSavepoint(Savepoint savepoint) throws SQLException {
          debug();
      }
  
      public Statement createStatement(int i, int i1, int i2) throws SQLException {
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, int i, int i1, int i2) throws SQLException
{
          debug();
          return null;
      }
  
      public CallableStatement prepareCall(String s, int i, int i1, int i2) throws SQLException
{
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, int i) throws SQLException {
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, int[] ints) throws SQLException
{
          debug();
          return null;
      }
  
      public PreparedStatement prepareStatement(String s, String[] strings) throws SQLException
{
          debug();
          return null;
      }
  
  
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message