db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r463330 - in /db/ddlutils/trunk/src: java/org/apache/ddlutils/ java/org/apache/ddlutils/dynabean/ java/org/apache/ddlutils/model/ java/org/apache/ddlutils/platform/ java/org/apache/ddlutils/platform/sybase/ test/org/apache/ddlutils/
Date Thu, 12 Oct 2006 17:20:49 GMT
Author: tomdz
Date: Thu Oct 12 10:20:48 2006
New Revision: 463330

URL: http://svn.apache.org/viewvc?view=rev&rev=463330
Log:
Cleaned up exception hierarchy

Added:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/DatabaseOperationException.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/dynabean/SqlDynaException.java
Removed:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/DynaSqlException.java
Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/PlatformUtils.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/ModelBasedResultSetIterator.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/SqlBuilder.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/sybase/SybasePlatform.java
    db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java

Added: db/ddlutils/trunk/src/java/org/apache/ddlutils/DatabaseOperationException.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/DatabaseOperationException.java?view=auto&rev=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/DatabaseOperationException.java (added)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/DatabaseOperationException.java Thu Oct 12 10:20:48 2006
@@ -0,0 +1,71 @@
+package org.apache.ddlutils;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * This exception is thrown when a database operation failed.
+ * 
+ * @version $Revision: 289996 $
+ */
+public class DatabaseOperationException extends DdlUtilsException 
+{
+    /** Constant for serializing instances of this class. */
+	private static final long serialVersionUID = -3090677744278358036L;
+
+	/**
+     * Creates a new empty exception object.
+     */
+    public DatabaseOperationException()
+    {
+        super();
+    }
+
+    /**
+     * Creates a new exception object.
+     * 
+     * @param msg The exception message
+     */
+    public DatabaseOperationException(String msg)
+    {
+        super(msg);
+    }
+
+    /**
+     * Creates a new exception object.
+     * 
+     * @param baseEx The base exception
+     */
+    public DatabaseOperationException(Throwable baseEx)
+    {
+        super(baseEx);
+    }
+
+    /**
+     * Creates a new exception object.
+     * 
+     * @param msg    The exception message
+     * @param baseEx The base exception
+     */
+    public DatabaseOperationException(String msg, Throwable baseEx)
+    {
+        super(msg, baseEx);
+    }
+
+}

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java Thu Oct 12 10:20:48 2006
@@ -186,7 +186,7 @@
      * 
      * @return The connection
      */
-    public Connection borrowConnection() throws DynaSqlException;
+    public Connection borrowConnection() throws DatabaseOperationException;
 
     /**
      * Closes the given JDBC connection (returns it back to the pool if the datasource is poolable).
@@ -204,7 +204,7 @@
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      * @return The number of errors
      */
-    public int evaluateBatch(String sql, boolean continueOnError) throws DynaSqlException;
+    public int evaluateBatch(String sql, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Executes a series of sql statements which must be seperated by the delimiter
@@ -219,14 +219,14 @@
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      * @return The number of errors
      */
-    public int evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DynaSqlException;
+    public int evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Performs a shutdown at the database. This is necessary for some embedded databases which otherwise
      * would be locked and thus would refuse other connections. Note that this does not change the database
      * structure or data in it in any way.
      */
-    public void shutdownDatabase() throws DynaSqlException;
+    public void shutdownDatabase() throws DatabaseOperationException;
 
     /**
      * Performs a shutdown at the database. This is necessary for some embedded databases which otherwise
@@ -235,7 +235,7 @@
      * 
      * @param connection The connection to the database
      */
-    public void shutdownDatabase(Connection connection) throws DynaSqlException;
+    public void shutdownDatabase(Connection connection) throws DatabaseOperationException;
 
     /**
      * Creates the database specified by the given parameters. Please note that this method does not
@@ -252,7 +252,7 @@
      * @param password            The password for creating the database
      * @param parameters          Additional parameters relevant to database creation (which are platform specific)
      */
-    public void createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DynaSqlException, UnsupportedOperationException;
+    public void createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DatabaseOperationException, UnsupportedOperationException;
 
     /**
      * Drops the database specified by the given parameters. Please note that this method does not
@@ -264,7 +264,7 @@
      * @param username            The username for creating the database
      * @param password            The password for creating the database
      */
-    public void dropDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password) throws DynaSqlException, UnsupportedOperationException;
+    public void dropDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password) throws DatabaseOperationException, UnsupportedOperationException;
 
     /**
      * Creates the tables defined in the database model.
@@ -273,7 +273,7 @@
      * @param dropTablesFirst Whether to drop the tables prior to creating them (anew)
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      */
-    public void createTables(Database model, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException;
+    public void createTables(Database model, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Creates the tables defined in the database model.
@@ -283,7 +283,7 @@
      * @param dropTablesFirst Whether to drop the tables prior to creating them (anew)
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      */
-    public void createTables(Connection connection, Database model, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException;
+    public void createTables(Connection connection, Database model, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for creating the tables defined in the database model.
@@ -293,7 +293,7 @@
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      * @return The SQL statements
      */
-    public String getCreateTablesSql(Database model, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException;
+    public String getCreateTablesSql(Database model, boolean dropTablesFirst, boolean continueOnError);
 
     /**
      * Creates the tables defined in the database model.
@@ -303,7 +303,7 @@
      * @param dropTablesFirst Whether to drop the tables prior to creating them (anew)
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      */
-    public void createTables(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException;
+    public void createTables(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Creates the tables defined in the database model.
@@ -314,7 +314,7 @@
      * @param dropTablesFirst Whether to drop the tables prior to creating them (anew)
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      */
-    public void createTables(Connection connection, Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException;
+    public void createTables(Connection connection, Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for creating the tables defined in the database model.
@@ -325,7 +325,7 @@
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      * @return The SQL statements
      */
-    public String getCreateTablesSql(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException;
+    public String getCreateTablesSql(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError);
 
     /**
      * Alters the database schema so that it match the given model.
@@ -333,7 +333,7 @@
      * @param desiredDb       The desired database schema
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(Database desiredDb, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(Database desiredDb, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -341,7 +341,7 @@
      * @param desiredDb The desired database schema
      * @return The SQL statements
      */
-    public String getAlterTablesSql(Database desiredDb) throws DynaSqlException;
+    public String getAlterTablesSql(Database desiredDb) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -350,7 +350,7 @@
      * @param params          The parameters used in the creation
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -359,7 +359,7 @@
      * @param params    The parameters used in the creation
      * @return The SQL statements
      */
-    public String getAlterTablesSql(Database desiredDb, CreationParameters params) throws DynaSqlException;
+    public String getAlterTablesSql(Database desiredDb, CreationParameters params) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -373,7 +373,7 @@
      * @param desiredDb       The desired database schema
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -387,7 +387,7 @@
      * @param desiredDb  The desired database schema
      * @return The SQL statements
      */
-    public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb) throws DynaSqlException;
+    public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -402,7 +402,7 @@
      * @param params          The parameters used in the creation
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -417,7 +417,7 @@
      * @param params     The parameters used in the creation
      * @return The SQL statements
      */
-    public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DynaSqlException;
+    public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -426,7 +426,7 @@
      * @param desiredDb       The desired database schema
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(Connection connection, Database desiredDb, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(Connection connection, Database desiredDb, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -435,7 +435,7 @@
      * @param desiredDb  The desired database schema
      * @return The SQL statements
      */
-    public String getAlterTablesSql(Connection connection, Database desiredDb) throws DynaSqlException;
+    public String getAlterTablesSql(Connection connection, Database desiredDb) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -445,7 +445,7 @@
      * @param params          The parameters used in the creation
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(Connection connection, Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(Connection connection, Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -455,7 +455,7 @@
      * @param params     The parameters used in the creation
      * @return The SQL statements
      */
-    public String getAlterTablesSql(Connection connection, Database desiredDb, CreationParameters params) throws DynaSqlException;
+    public String getAlterTablesSql(Connection connection, Database desiredDb, CreationParameters params) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -470,7 +470,7 @@
      * @param desiredDb       The desired database schema
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -485,7 +485,7 @@
      * @param desiredDb  The desired database schema
      * @return The SQL statements
      */
-    public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb) throws DynaSqlException;
+    public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb) throws DatabaseOperationException;
 
     /**
      * Alters the database schema so that it match the given model.
@@ -501,7 +501,7 @@
      * @param params          The parameters used in the creation
      * @param continueOnError Whether to continue with the next sql statement when an error occurred
      */
-    public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException;
+    public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for altering the database schema so that it match the given model.
@@ -517,7 +517,7 @@
      * @param params     The parameters used in the creation
      * @return The SQL statements
      */
-    public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DynaSqlException;
+    public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DatabaseOperationException;
 
     /**
      * Drops the tables defined in the given database.
@@ -525,7 +525,7 @@
      * @param model           The database model
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      */
-    public void dropTables(Database model, boolean continueOnError) throws DynaSqlException;
+    public void dropTables(Database model, boolean continueOnError) throws DatabaseOperationException;
 
     /**
      * Returns the SQL for dropping the tables defined in the given database.
@@ -534,7 +534,7 @@
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      * @return The SQL statements
      */
-    public String getDropTablesSql(Database model, boolean continueOnError) throws DynaSqlException;
+    public String getDropTablesSql(Database model, boolean continueOnError);
 
     /**
      * Drops the tables defined in the given database.
@@ -543,7 +543,7 @@
      * @param model           The database model
      * @param continueOnError Whether to continue executing the sql commands when an error occurred
      */
-    public void dropTables(Connection connection, Database model, boolean continueOnError) throws DynaSqlException; 
+    public void dropTables(Connection connection, Database model, boolean continueOnError) throws DatabaseOperationException; 
 
     /**
      * Performs the given SQL query returning an iterator over the results.
@@ -552,7 +552,7 @@
      * @param sql   The sql query to perform
      * @return An iterator for the dyna beans resulting from the query
      */
-    public Iterator query(Database model, String sql) throws DynaSqlException;
+    public Iterator query(Database model, String sql) throws DatabaseOperationException;
 
     /**
      * Performs the given parameterized SQL query returning an iterator over the results.
@@ -562,7 +562,7 @@
      * @param parameters The query parameter values
      * @return An iterator for the dyna beans resulting from the query
      */
-    public Iterator query(Database model, String sql, Collection parameters) throws DynaSqlException;
+    public Iterator query(Database model, String sql, Collection parameters) throws DatabaseOperationException;
 
     /**
      * Performs the given SQL query returning an iterator over the results.
@@ -572,7 +572,7 @@
      * @param queryHints The tables that are queried (optional)
      * @return An iterator for the dyna beans resulting from the query
      */
-    public Iterator query(Database model, String sql, Table[] queryHints) throws DynaSqlException;
+    public Iterator query(Database model, String sql, Table[] queryHints) throws DatabaseOperationException;
 
     /**
      * Performs the given parameterized SQL query returning an iterator over the results.
@@ -583,7 +583,7 @@
      * @param queryHints The tables that are queried (optional)
      * @return An iterator for the dyna beans resulting from the query
      */
-    public Iterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DynaSqlException;
+    public Iterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -594,7 +594,7 @@
      * @param sql   The sql query
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql) throws DynaSqlException;
+    public List fetch(Database model, String sql) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -607,7 +607,7 @@
      * @param parameters The parameter values
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, Collection parameters) throws DynaSqlException;
+    public List fetch(Database model, String sql, Collection parameters) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -619,7 +619,7 @@
      * @param queryHints The tables that are queried (optional)
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, Table[] queryHints) throws DynaSqlException;
+    public List fetch(Database model, String sql, Table[] queryHints) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -633,7 +633,7 @@
      * @param queryHints The tables that are queried (optional)
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints) throws DynaSqlException;
+    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -649,7 +649,7 @@
      * @param end   Row number to stop at (inclusively; -1 for last row)
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, int start, int end) throws DynaSqlException;
+    public List fetch(Database model, String sql, int start, int end) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -666,7 +666,7 @@
      * @param end        Row number to stop at (inclusively; -1 for last row)
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, Collection parameters, int start, int end) throws DynaSqlException;
+    public List fetch(Database model, String sql, Collection parameters, int start, int end) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -683,7 +683,7 @@
      * @param end   Row number to stop at (inclusively; -1 for last row)
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DynaSqlException;
+    public List fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DatabaseOperationException;
 
     /**
      * Queries for a list of dyna beans representing rows of the given query.
@@ -701,7 +701,7 @@
      * @param end        Row number to stop at (inclusively; -1 for last row)
      * @return The dyna beans resulting from the query
      */
-    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DynaSqlException;
+    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DatabaseOperationException;
 
     /**
      * Stores the given bean in the database, inserting it if there is no primary key
@@ -710,7 +710,7 @@
      * @param model    The database model to use
      * @param dynaBean The bean to store
      */
-    public void store(Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void store(Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Returns the sql for inserting the given bean.
@@ -727,7 +727,7 @@
      * @param model    The database model to use
      * @param dynaBean The bean to insert
      */
-    public void insert(Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void insert(Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Inserts the bean. If one of the columns is an auto-incremented column, then the
@@ -738,7 +738,7 @@
      * @param model      The database model to use
      * @param dynaBean   The bean
      */
-    public void insert(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void insert(Connection connection, Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Inserts the given beans in the database, assuming the primary key values are specified.
@@ -750,7 +750,7 @@
      * @param model     The database model to use
      * @param dynaBeans The beans to insert
      */
-    public void insert(Database model, Collection dynaBeans) throws DynaSqlException;
+    public void insert(Database model, Collection dynaBeans) throws DatabaseOperationException;
 
     /**
      * Inserts the given beans. Note that a batch insert is used for subsequent beans of the same type.
@@ -763,7 +763,7 @@
      * @param model      The database model to use
      * @param dynaBeans  The beans
      */
-    public void insert(Connection connection, Database model, Collection dynaBeans) throws DynaSqlException;
+    public void insert(Connection connection, Database model, Collection dynaBeans) throws DatabaseOperationException;
 
     /**
      * Returns the sql for updating the given bean in the database.
@@ -780,7 +780,7 @@
      * @param model    The database model to use
      * @param dynaBean The bean
      */
-    public void update(Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void update(Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Updates the row which maps to the given bean.
@@ -789,7 +789,7 @@
      * @param model      The database model to use
      * @param dynaBean   The bean
      */
-    public void update(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void update(Connection connection, Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Returns the sql for deleting the given bean from the database.
@@ -806,7 +806,7 @@
      * @param model    The database model to use
      * @param dynaBean The bean to delete
      */
-    public void delete(Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void delete(Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Deletes the row which maps to the given bean from the database.
@@ -815,7 +815,7 @@
      * @param dynaBean   The bean
      * @param connection The database connection
      */
-    public void delete(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException;
+    public void delete(Connection connection, Database model, DynaBean dynaBean) throws DatabaseOperationException;
 
     /**
      * Reads the database model from the live database as specified by the data source set for
@@ -824,9 +824,9 @@
      * @param name The name of the resulting database; <code>null</code> when the default name (the catalog)
      *             is desired which might be <code>null</code> itself though
      * @return The database model
-     * @throws DynaSqlException If an error occurred during reading the model
+     * @throws DatabaseOperationException If an error occurred during reading the model
      */
-    public Database readModelFromDatabase(String name) throws DynaSqlException;
+    public Database readModelFromDatabase(String name) throws DatabaseOperationException;
 
     /**
      * Reads the database model from the live database as specified by the data source set for
@@ -838,9 +838,9 @@
      * @param schema     The schema to access in the database; use <code>null</code> for the default value
      * @param tableTypes The table types to process; use <code>null</code> or an empty list for the default ones
      * @return The database model
-     * @throws DynaSqlException If an error occurred during reading the model
+     * @throws DatabaseOperationException If an error occurred during reading the model
      */
-    public Database readModelFromDatabase(String name, String catalog, String schema, String[] tableTypes) throws DynaSqlException;
+    public Database readModelFromDatabase(String name, String catalog, String schema, String[] tableTypes) throws DatabaseOperationException;
 
     /**
      * Reads the database model from the live database to which the given connection is pointing.
@@ -849,9 +849,9 @@
      * @param name       The name of the resulting database; <code>null</code> when the default name (the catalog)
      *                   is desired which might be <code>null</code> itself though
      * @return The database model
-     * @throws DynaSqlException If an error occurred during reading the model
+     * @throws DatabaseOperationException If an error occurred during reading the model
      */
-    public Database readModelFromDatabase(Connection connection, String name) throws DynaSqlException;
+    public Database readModelFromDatabase(Connection connection, String name) throws DatabaseOperationException;
 
     /**
      * Reads the database model from the live database to which the given connection is pointing.
@@ -863,7 +863,7 @@
      * @param schema     The schema to access in the database; use <code>null</code> for the default value
      * @param tableTypes The table types to process; use <code>null</code> or an empty list for the default ones
      * @return The database model
-     * @throws DynaSqlException If an error occurred during reading the model
+     * @throws DatabaseOperationException If an error occurred during reading the model
      */
-    public Database readModelFromDatabase(Connection connection, String name, String catalog, String schema, String[] tableTypes) throws DynaSqlException;
+    public Database readModelFromDatabase(Connection connection, String name, String catalog, String schema, String[] tableTypes) throws DatabaseOperationException;
 }

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/PlatformUtils.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/PlatformUtils.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/PlatformUtils.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/PlatformUtils.java Thu Oct 12 10:20:48 2006
@@ -223,7 +223,7 @@
      * @param dataSource The data source
      * @return The database type or <code>null</code> if the database type couldn't be determined
      */
-    public String determineDatabaseType(DataSource dataSource) throws DynaSqlException
+    public String determineDatabaseType(DataSource dataSource) throws DatabaseOperationException
     {
         return determineDatabaseType(dataSource, null, null);
     }
@@ -237,7 +237,7 @@
      * @param password   The password to use for connecting to the database
      * @return The database type or <code>null</code> if the database type couldn't be determined
      */
-    public String determineDatabaseType(DataSource dataSource, String username, String password) throws DynaSqlException
+    public String determineDatabaseType(DataSource dataSource, String username, String password) throws DatabaseOperationException
     {
         Connection connection = null;
 
@@ -258,7 +258,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while reading the database metadata: " + ex.getMessage(), ex);
+            throw new DatabaseOperationException("Error while reading the database metadata: " + ex.getMessage(), ex);
         }
         finally
         {

Added: db/ddlutils/trunk/src/java/org/apache/ddlutils/dynabean/SqlDynaException.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/dynabean/SqlDynaException.java?view=auto&rev=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/dynabean/SqlDynaException.java (added)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/dynabean/SqlDynaException.java Thu Oct 12 10:20:48 2006
@@ -0,0 +1,73 @@
+package org.apache.ddlutils.dynabean;
+
+import org.apache.ddlutils.DdlUtilsException;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * This exception is thrown when something dealing with sql dyna beans or classes failed.
+ * 
+ * @version $Revision: 289996 $
+ */
+public class SqlDynaException extends DdlUtilsException
+{
+    /** Constant for serializing instances of this class. */
+	private static final long serialVersionUID = 7904337501884384392L;
+
+	/**
+     * Creates a new empty exception object.
+     */
+    public SqlDynaException()
+    {
+        super();
+    }
+
+    /**
+     * Creates a new exception object.
+     * 
+     * @param msg The exception message
+     */
+    public SqlDynaException(String msg)
+    {
+        super(msg);
+    }
+
+    /**
+     * Creates a new exception object.
+     * 
+     * @param baseEx The base exception
+     */
+    public SqlDynaException(Throwable baseEx)
+    {
+        super(baseEx);
+    }
+
+    /**
+     * Creates a new exception object.
+     * 
+     * @param msg    The exception message
+     * @param baseEx The base exception
+     */
+    public SqlDynaException(String msg, Throwable baseEx)
+    {
+        super(msg, baseEx);
+    }
+
+}

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/model/Database.java Thu Oct 12 10:20:48 2006
@@ -29,9 +29,9 @@
 import org.apache.commons.beanutils.DynaBean;
 import org.apache.commons.lang.builder.EqualsBuilder;
 import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.ddlutils.DynaSqlException;
 import org.apache.ddlutils.dynabean.DynaClassCache;
 import org.apache.ddlutils.dynabean.SqlDynaClass;
+import org.apache.ddlutils.dynabean.SqlDynaException;
 
 /**
  * Represents the database model, ie. the tables in the database. It also
@@ -62,7 +62,7 @@
      * 
      * @param otherDb The other database model
      */
-    public void mergeWith(Database otherDb) throws DynaSqlException
+    public void mergeWith(Database otherDb) throws ModelException
     {
         for (Iterator it = otherDb._tables.iterator(); it.hasNext();)
         {
@@ -71,7 +71,7 @@
             if (findTable(table.getName()) != null)
             {
                 // TODO: It might make more sense to log a warning and overwrite the table (or merge them) ?
-                throw new DynaSqlException("Cannot merge the models because table "+table.getName()+" already defined in this model");
+                throw new ModelException("Cannot merge the models because table "+table.getName()+" already defined in this model");
             }
             try
             {
@@ -497,7 +497,7 @@
      * @param table The table to create the bean for
      * @return The new dyna bean
      */
-    public DynaBean createDynaBeanFor(Table table) throws DynaSqlException
+    public DynaBean createDynaBeanFor(Table table) throws SqlDynaException
     {
         return getDynaClassCache().createNewInstance(table);
     }
@@ -510,7 +510,7 @@
      * @param caseSensitive Whether case matters for the names
      * @return The new dyna bean
      */
-    public DynaBean createDynaBeanFor(String tableName, boolean caseSensitive) throws DynaSqlException
+    public DynaBean createDynaBeanFor(String tableName, boolean caseSensitive) throws SqlDynaException
     {
         return getDynaClassCache().createNewInstance(findTable(tableName, caseSensitive));
     }

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/ModelBasedResultSetIterator.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/ModelBasedResultSetIterator.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/ModelBasedResultSetIterator.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/ModelBasedResultSetIterator.java Thu Oct 12 10:20:48 2006
@@ -35,7 +35,7 @@
 import org.apache.commons.beanutils.DynaClass;
 import org.apache.commons.beanutils.DynaProperty;
 import org.apache.commons.collections.map.ListOrderedMap;
-import org.apache.ddlutils.DynaSqlException;
+import org.apache.ddlutils.DatabaseOperationException;
 import org.apache.ddlutils.dynabean.SqlDynaBean;
 import org.apache.ddlutils.dynabean.SqlDynaClass;
 import org.apache.ddlutils.model.Column;
@@ -82,7 +82,7 @@
      * @param cleanUpAfterFinish Whether to close the statement and connection after finishing
      *                           the iteration, upon on exception, or when this iterator is garbage collected
      */
-    public ModelBasedResultSetIterator(PlatformImplBase platform, Database model, ResultSet resultSet, Table[] queryHints, boolean cleanUpAfterFinish) throws DynaSqlException
+    public ModelBasedResultSetIterator(PlatformImplBase platform, Database model, ResultSet resultSet, Table[] queryHints, boolean cleanUpAfterFinish) throws DatabaseOperationException
     {
         if (resultSet != null)
         {
@@ -99,7 +99,7 @@
             catch (SQLException ex)
             {
                 cleanUp();
-                throw new DynaSqlException("Could not read the metadata of the result set", ex);
+                throw new DatabaseOperationException("Could not read the metadata of the result set", ex);
             }
         }
         else
@@ -209,7 +209,7 @@
     /**
      * {@inheritDoc}
      */
-    public boolean hasNext() throws DynaSqlException
+    public boolean hasNext() throws DatabaseOperationException
     {
         advanceIfNecessary();
         return !_isAtEnd;
@@ -218,7 +218,7 @@
     /**
      * {@inheritDoc}
      */
-    public Object next() throws DynaSqlException
+    public Object next() throws DatabaseOperationException
     {
         advanceIfNecessary();
         if (_isAtEnd)
@@ -260,7 +260,7 @@
             catch (Exception ex)
             {
                 cleanUp();
-                throw new DynaSqlException("Exception while reading the row from the resultset", ex);
+                throw new DatabaseOperationException("Exception while reading the row from the resultset", ex);
             }
         }
     }
@@ -268,7 +268,7 @@
     /**
      * Advances the result set if necessary.
      */
-    private void advanceIfNecessary() throws DynaSqlException
+    private void advanceIfNecessary() throws DatabaseOperationException
     {
         if (_needsAdvancing && !_isAtEnd)
         {
@@ -280,7 +280,7 @@
             catch (SQLException ex)
             {
                 cleanUp();
-                throw new DynaSqlException("Could not retrieve next row from result set", ex);
+                throw new DatabaseOperationException("Could not retrieve next row from result set", ex);
             }
             if (_isAtEnd)
             {
@@ -292,7 +292,7 @@
     /**
      * {@inheritDoc}
      */
-    public void remove() throws DynaSqlException
+    public void remove() throws DatabaseOperationException
     {
         try
         {
@@ -301,7 +301,7 @@
         catch (SQLException ex)
         {
             cleanUp();
-            throw new DynaSqlException("Failed to delete current row", ex);
+            throw new DatabaseOperationException("Failed to delete current row", ex);
         }
     }
 

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java Thu Oct 12 10:20:48 2006
@@ -46,8 +46,8 @@
 import org.apache.commons.collections.Predicate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ddlutils.DatabaseOperationException;
 import org.apache.ddlutils.DdlUtilsException;
-import org.apache.ddlutils.DynaSqlException;
 import org.apache.ddlutils.Platform;
 import org.apache.ddlutils.PlatformInfo;
 import org.apache.ddlutils.dynabean.SqlDynaClass;
@@ -238,7 +238,7 @@
     /**
      * {@inheritDoc}
      */
-    public int evaluateBatch(String sql, boolean continueOnError) throws DynaSqlException
+    public int evaluateBatch(String sql, boolean continueOnError) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -255,7 +255,7 @@
     /**
      * {@inheritDoc}
      */
-    public int evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DynaSqlException
+    public int evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DatabaseOperationException
     {
         Statement statement    = null;
         int       errors       = 0;
@@ -310,7 +310,7 @@
                     }
                     else
                     {
-                        throw new DynaSqlException("Error while executing SQL "+command, ex);
+                        throw new DatabaseOperationException("Error while executing SQL "+command, ex);
                     }
                 }
 
@@ -328,7 +328,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while executing SQL", ex);
+            throw new DatabaseOperationException("Error while executing SQL", ex);
         }
         finally
         {
@@ -341,7 +341,7 @@
     /**
      * {@inheritDoc}
      */
-    public void shutdownDatabase() throws DynaSqlException
+    public void shutdownDatabase() throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -358,7 +358,7 @@
     /**
      * {@inheritDoc}
      */
-    public void shutdownDatabase(Connection connection) throws DynaSqlException
+    public void shutdownDatabase(Connection connection) throws DatabaseOperationException
     {
         // Per default do nothing as most databases don't need this
     }
@@ -366,7 +366,7 @@
     /**
      * {@inheritDoc}
      */
-    public void createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DynaSqlException, UnsupportedOperationException
+    public void createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DatabaseOperationException, UnsupportedOperationException
     {
         throw new UnsupportedOperationException("Database creation is not supported for the database platform "+getName());
     }
@@ -374,7 +374,7 @@
     /**
      * {@inheritDoc}
      */
-    public void dropDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password) throws DynaSqlException, UnsupportedOperationException
+    public void dropDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password) throws DatabaseOperationException, UnsupportedOperationException
     {
         throw new UnsupportedOperationException("Database deletion is not supported for the database platform "+getName());
     }
@@ -382,7 +382,7 @@
     /**
      * {@inheritDoc}
      */
-    public void createTables(Database model, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException
+    public void createTables(Database model, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -399,7 +399,7 @@
     /**
      * {@inheritDoc}
      */
-    public void createTables(Connection connection, Database model, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException
+    public void createTables(Connection connection, Database model, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
     {
         String sql = getCreateTablesSql(model, dropTablesFirst, continueOnError);
 
@@ -409,7 +409,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getCreateTablesSql(Database model, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException
+    public String getCreateTablesSql(Database model, boolean dropTablesFirst, boolean continueOnError)
     {
         String sql = null;
 
@@ -431,7 +431,7 @@
     /**
      * {@inheritDoc}
      */
-    public void createTables(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException
+    public void createTables(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -448,7 +448,7 @@
     /**
      * {@inheritDoc}
      */
-    public void createTables(Connection connection, Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException
+    public void createTables(Connection connection, Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DatabaseOperationException
     {
         String sql = getCreateTablesSql(model, params, dropTablesFirst, continueOnError);
 
@@ -458,7 +458,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getCreateTablesSql(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError) throws DynaSqlException
+    public String getCreateTablesSql(Database model, CreationParameters params, boolean dropTablesFirst, boolean continueOnError)
     {
         String sql = null;
 
@@ -480,7 +480,7 @@
     /**
      * {@inheritDoc}
      */
-    public void alterTables(Database desiredDb, boolean continueOnError) throws DynaSqlException
+    public void alterTables(Database desiredDb, boolean continueOnError) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -497,7 +497,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getAlterTablesSql(Database desiredDb) throws DynaSqlException
+    public String getAlterTablesSql(Database desiredDb) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -514,7 +514,7 @@
     /**
      * {@inheritDoc}
      */
-    public void alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException
+    public void alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -531,7 +531,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getAlterTablesSql(Database desiredDb, CreationParameters params) throws DynaSqlException
+    public String getAlterTablesSql(Database desiredDb, CreationParameters params) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -548,7 +548,7 @@
     /**
      * {@inheritDoc}
      */
-    public void alterTables(Connection connection, Database desiredModel, boolean continueOnError) throws DynaSqlException
+    public void alterTables(Connection connection, Database desiredModel, boolean continueOnError) throws DatabaseOperationException
     {
         String sql = getAlterTablesSql(connection, desiredModel);
 
@@ -558,7 +558,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getAlterTablesSql(Connection connection, Database desiredModel) throws DynaSqlException
+    public String getAlterTablesSql(Connection connection, Database desiredModel) throws DatabaseOperationException
     {
         String   sql          = null;
         Database currentModel = readModelFromDatabase(connection, desiredModel.getName());
@@ -581,7 +581,7 @@
     /**
      * {@inheritDoc}
      */
-    public void alterTables(Connection connection, Database desiredModel, CreationParameters params, boolean continueOnError) throws DynaSqlException
+    public void alterTables(Connection connection, Database desiredModel, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
     {
         String sql = getAlterTablesSql(connection, desiredModel, params);
 
@@ -591,7 +591,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getAlterTablesSql(Connection connection, Database desiredModel, CreationParameters params) throws DynaSqlException
+    public String getAlterTablesSql(Connection connection, Database desiredModel, CreationParameters params) throws DatabaseOperationException
     {
         String   sql          = null;
         Database currentModel = readModelFromDatabase(connection, desiredModel.getName());
@@ -614,7 +614,7 @@
 	/**
      * {@inheritDoc}
      */
-	public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, boolean continueOnError) throws DynaSqlException
+	public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, boolean continueOnError) throws DatabaseOperationException
 	{
         Connection connection = borrowConnection();
 
@@ -631,7 +631,7 @@
 	/**
      * {@inheritDoc}
      */
-	public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel) throws DynaSqlException
+	public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel) throws DatabaseOperationException
 	{
         Connection connection = borrowConnection();
 
@@ -648,7 +648,7 @@
 	/**
      * {@inheritDoc}
      */
-	public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean continueOnError) throws DynaSqlException
+	public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
 	{
         Connection connection = borrowConnection();
 
@@ -665,7 +665,7 @@
 	/**
      * {@inheritDoc}
      */
-    public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params) throws DynaSqlException
+    public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -682,7 +682,7 @@
 	/**
      * {@inheritDoc}
      */
-	public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, boolean continueOnError) throws DynaSqlException
+	public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, boolean continueOnError) throws DatabaseOperationException
     {
         String sql = getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel);
 
@@ -692,7 +692,7 @@
 	/**
      * {@inheritDoc}
      */
-	public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel) throws DynaSqlException
+	public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel) throws DatabaseOperationException
 	{
         String   sql          = null;
         Database currentModel = readModelFromDatabase(connection, desiredModel.getName(), catalog, schema, tableTypes);
@@ -715,7 +715,7 @@
 	/**
      * {@inheritDoc}
      */
-	public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean continueOnError) throws DynaSqlException
+	public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean continueOnError) throws DatabaseOperationException
 	{
         String sql = getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, params);
 
@@ -725,7 +725,7 @@
 	/**
      * {@inheritDoc}
      */
-	public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params) throws DynaSqlException
+	public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params) throws DatabaseOperationException
 	{
         String   sql          = null;
         Database currentModel = readModelFromDatabase(connection, desiredModel.getName(), catalog, schema, tableTypes);
@@ -748,7 +748,7 @@
 	/**
      * {@inheritDoc}
      */
-    public void dropTables(Database model, boolean continueOnError) throws DynaSqlException
+    public void dropTables(Database model, boolean continueOnError) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -765,7 +765,7 @@
     /**
      * {@inheritDoc}
      */
-    public void dropTables(Connection connection, Database model, boolean continueOnError) throws DynaSqlException 
+    public void dropTables(Connection connection, Database model, boolean continueOnError) throws DatabaseOperationException 
     {
         String sql = getDropTablesSql(model, continueOnError);
 
@@ -775,7 +775,7 @@
     /**
      * {@inheritDoc}
      */
-    public String getDropTablesSql(Database model, boolean continueOnError) throws DynaSqlException 
+    public String getDropTablesSql(Database model, boolean continueOnError) 
     {
         String sql = null;
 
@@ -797,7 +797,7 @@
     /**
      * {@inheritDoc}
      */
-    public Iterator query(Database model, String sql) throws DynaSqlException
+    public Iterator query(Database model, String sql) throws DatabaseOperationException
     {
         return query(model, sql, (Table[])null);
     }
@@ -805,7 +805,7 @@
     /**
      * {@inheritDoc}
      */
-    public Iterator query(Database model, String sql, Collection parameters) throws DynaSqlException
+    public Iterator query(Database model, String sql, Collection parameters) throws DatabaseOperationException
     {
         return query(model, sql, parameters, null);
     }
@@ -813,7 +813,7 @@
     /**
      * {@inheritDoc}
      */
-    public Iterator query(Database model, String sql, Table[] queryHints) throws DynaSqlException
+    public Iterator query(Database model, String sql, Table[] queryHints) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
         Statement  statement  = null;
@@ -829,7 +829,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while performing a query", ex);
+            throw new DatabaseOperationException("Error while performing a query", ex);
         }
         finally
         {
@@ -846,7 +846,7 @@
     /**
      * {@inheritDoc}
      */
-    public Iterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DynaSqlException
+    public Iterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException
     {
         Connection        connection = borrowConnection();
         PreparedStatement statement  = null;
@@ -879,7 +879,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while performing a query", ex);
+            throw new DatabaseOperationException("Error while performing a query", ex);
         }
         finally
         {
@@ -896,7 +896,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql) throws DynaSqlException
+    public List fetch(Database model, String sql) throws DatabaseOperationException
     {
         return fetch(model, sql, (Table[])null, 0, -1);
     }
@@ -904,7 +904,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, Table[] queryHints) throws DynaSqlException
+    public List fetch(Database model, String sql, Table[] queryHints) throws DatabaseOperationException
     {
         return fetch(model, sql, queryHints, 0, -1);
     }
@@ -912,7 +912,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, int start, int end) throws DynaSqlException
+    public List fetch(Database model, String sql, int start, int end) throws DatabaseOperationException
     {
         return fetch(model, sql, (Table[])null, start, end);
     }
@@ -920,7 +920,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DynaSqlException
+    public List fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
         Statement  statement  = null;
@@ -944,7 +944,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while fetching data from the database", ex);
+            throw new DatabaseOperationException("Error while fetching data from the database", ex);
         } 
         finally 
         {
@@ -959,7 +959,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, Collection parameters) throws DynaSqlException
+    public List fetch(Database model, String sql, Collection parameters) throws DatabaseOperationException
     {
         return fetch(model, sql, parameters, null, 0, -1);
     }
@@ -967,7 +967,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, Collection parameters, int start, int end) throws DynaSqlException
+    public List fetch(Database model, String sql, Collection parameters, int start, int end) throws DatabaseOperationException
     {
         return fetch(model, sql, parameters, null, start, end);
     }
@@ -975,7 +975,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints) throws DynaSqlException
+    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException
     {
         return fetch(model, sql, parameters, queryHints, 0, -1);
     }
@@ -983,7 +983,7 @@
     /**
      * {@inheritDoc}
      */
-    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DynaSqlException
+    public List fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DatabaseOperationException
     {
         Connection        connection = borrowConnection();
         PreparedStatement statement  = null;
@@ -1027,7 +1027,7 @@
             // any other exception comes from the iterator which closes the resources automatically
             closeStatement(statement);
             returnConnection(connection);
-            throw new DynaSqlException("Error while fetching data from the database", ex);
+            throw new DatabaseOperationException("Error while fetching data from the database", ex);
         }
         return result;
     }
@@ -1159,7 +1159,7 @@
     /**
      * {@inheritDoc}
      */
-    public void insert(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException
+    public void insert(Connection connection, Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         SqlDynaClass      dynaClass       = model.getDynaClassFor(dynaBean);
         SqlDynaProperty[] properties      = getPropertiesForInsertion(model, dynaClass, dynaBean);
@@ -1220,7 +1220,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while inserting into the database", ex);
+            throw new DatabaseOperationException("Error while inserting into the database", ex);
         }
         finally
         {
@@ -1274,7 +1274,7 @@
             }
             catch (SQLException ex)
             {
-                throw new DynaSqlException("Error while retrieving the identity column value(s) from the database", ex);
+                throw new DatabaseOperationException("Error while retrieving the identity column value(s) from the database", ex);
             }
             finally
             {
@@ -1302,7 +1302,7 @@
             }
             catch (SQLException ex)
             {
-                throw new DynaSqlException(ex);
+                throw new DatabaseOperationException(ex);
             }
         }
     }
@@ -1310,7 +1310,7 @@
     /**
      * {@inheritDoc}
      */
-    public void insert(Database model, DynaBean dynaBean) throws DynaSqlException
+    public void insert(Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1327,7 +1327,7 @@
     /**
      * {@inheritDoc}
      */
-    public void insert(Connection connection, Database model, Collection dynaBeans) throws DynaSqlException
+    public void insert(Connection connection, Database model, Collection dynaBeans) throws DatabaseOperationException
     {
         SqlDynaClass      dynaClass              = null;
         SqlDynaProperty[] properties             = null;
@@ -1375,7 +1375,7 @@
                 }
                 catch (SQLException ex)
                 {
-                    throw new DynaSqlException("Error while preparing insert statement", ex);
+                    throw new DatabaseOperationException("Error while preparing insert statement", ex);
                 }
             }
             try
@@ -1389,7 +1389,7 @@
             }
             catch (SQLException ex)
             {
-                throw new DynaSqlException("Error while adding batch insert", ex);
+                throw new DatabaseOperationException("Error while adding batch insert", ex);
             }
         }
         if (dynaClass != null)
@@ -1405,7 +1405,7 @@
      * @param numRows   The number of rows that should change
      * @param tableName The name of the changed table
      */
-    private void executeBatch(PreparedStatement statement, int numRows, String tableName) throws DynaSqlException
+    private void executeBatch(PreparedStatement statement, int numRows, String tableName) throws DatabaseOperationException
     {
         if (statement != null)
         {
@@ -1428,7 +1428,7 @@
             }
             catch (SQLException ex)
             {
-                throw new DynaSqlException("Error while inserting into the database", ex);
+                throw new DatabaseOperationException("Error while inserting into the database", ex);
             }
         }
     }
@@ -1436,7 +1436,7 @@
     /**
      * {@inheritDoc}
      */
-    public void insert(Database model, Collection dynaBeans) throws DynaSqlException
+    public void insert(Database model, Collection dynaBeans) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1492,7 +1492,7 @@
     /**
      * {@inheritDoc}
      */
-    public void update(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException
+    public void update(Connection connection, Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         SqlDynaClass      dynaClass   = model.getDynaClassFor(dynaBean);
         SqlDynaProperty[] primaryKeys = dynaClass.getPrimaryKeyProperties();
@@ -1537,7 +1537,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while updating in the database", ex);
+            throw new DatabaseOperationException("Error while updating in the database", ex);
         }
         finally
         {
@@ -1548,7 +1548,7 @@
     /**
      * {@inheritDoc}
      */
-    public void update(Database model, DynaBean dynaBean) throws DynaSqlException
+    public void update(Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1578,7 +1578,7 @@
     /**
      * {@inheritDoc}
      */
-    public void store(Database model, DynaBean dynaBean) throws DynaSqlException
+    public void store(Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1640,7 +1640,7 @@
     /**
      * {@inheritDoc}
      */
-    public void delete(Database model, DynaBean dynaBean) throws DynaSqlException
+    public void delete(Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1657,7 +1657,7 @@
     /**
      * {@inheritDoc}
      */
-    public void delete(Connection connection, Database model, DynaBean dynaBean) throws DynaSqlException
+    public void delete(Connection connection, Database model, DynaBean dynaBean) throws DatabaseOperationException
     {
         PreparedStatement statement  = null;
 
@@ -1697,7 +1697,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException("Error while deleting from the database", ex);
+            throw new DatabaseOperationException("Error while deleting from the database", ex);
         }
         finally
         {
@@ -1708,7 +1708,7 @@
     /**
      * {@inheritDoc}
      */    
-    public Database readModelFromDatabase(String name) throws DynaSqlException
+    public Database readModelFromDatabase(String name) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1725,7 +1725,7 @@
     /**
      * {@inheritDoc}
      */    
-    public Database readModelFromDatabase(Connection connection, String name) throws DynaSqlException
+    public Database readModelFromDatabase(Connection connection, String name) throws DatabaseOperationException
     {
         try
         {
@@ -1736,14 +1736,14 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException(ex);
+            throw new DatabaseOperationException(ex);
         }
     }
 
     /**
      * {@inheritDoc}
      */
-    public Database readModelFromDatabase(String name, String catalog, String schema, String[] tableTypes) throws DynaSqlException
+    public Database readModelFromDatabase(String name, String catalog, String schema, String[] tableTypes) throws DatabaseOperationException
     {
         Connection connection = borrowConnection();
 
@@ -1760,7 +1760,7 @@
     /**
      * {@inheritDoc}
      */
-    public Database readModelFromDatabase(Connection connection, String name, String catalog, String schema, String[] tableTypes) throws DynaSqlException
+    public Database readModelFromDatabase(Connection connection, String name, String catalog, String schema, String[] tableTypes) throws DatabaseOperationException
     {
         try
         {
@@ -1776,7 +1776,7 @@
         }
         catch (SQLException ex)
         {
-            throw new DynaSqlException(ex);
+            throw new DatabaseOperationException(ex);
         }
     }
 

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/SqlBuilder.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/SqlBuilder.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/SqlBuilder.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/SqlBuilder.java Thu Oct 12 10:20:48 2006
@@ -41,7 +41,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ddlutils.DdlUtilsException;
-import org.apache.ddlutils.DynaSqlException;
 import org.apache.ddlutils.Platform;
 import org.apache.ddlutils.PlatformInfo;
 import org.apache.ddlutils.alteration.AddColumnChange;
@@ -69,6 +68,7 @@
 import org.apache.ddlutils.model.ForeignKey;
 import org.apache.ddlutils.model.Index;
 import org.apache.ddlutils.model.IndexColumn;
+import org.apache.ddlutils.model.ModelException;
 import org.apache.ddlutils.model.Reference;
 import org.apache.ddlutils.model.Table;
 import org.apache.ddlutils.model.TypeMap;
@@ -1814,7 +1814,7 @@
         {
             if (!getPlatformInfo().isNonPKIdentityColumnsSupported() && !column.isPrimaryKey())
             {
-                throw new DynaSqlException("Column "+column.getName()+" in table "+table.getName()+" is auto-incrementing but not a primary key column, which is not supported by the platform");
+                throw new ModelException("Column "+column.getName()+" in table "+table.getName()+" is auto-incrementing but not a primary key column, which is not supported by the platform");
             }
             print(" ");
             writeColumnAutoIncrementStmt(table, column);
@@ -1952,7 +1952,7 @@
             if (!getPlatformInfo().isDefaultValuesForLongTypesSupported() && 
                 ((column.getTypeCode() == Types.LONGVARBINARY) || (column.getTypeCode() == Types.LONGVARCHAR)))
             {
-                throw new DynaSqlException("The platform does not support default values for LONGVARCHAR or LONGVARBINARY columns");
+                throw new ModelException("The platform does not support default values for LONGVARCHAR or LONGVARBINARY columns");
             }
             // we write empty default value strings only if the type is not a numeric or date/time type
             if (isValidDefaultValue(column.getDefaultValue(), column.getTypeCode()))
@@ -2236,7 +2236,7 @@
 
             if (!index.isUnique() && !getPlatformInfo().isIndicesSupported())
             {
-                throw new DynaSqlException("Platform does not support non-unique indices");
+                throw new ModelException("Platform does not support non-unique indices");
             }
             writeExternalIndexCreateStmt(table, index);
         }
@@ -2294,7 +2294,7 @@
                     if (col == null)
                     {
                         // would get null pointer on next line anyway, so throw exception
-                        throw new DynaSqlException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());
+                        throw new ModelException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());
                     }
                     if (idx > 0)
                     {
@@ -2339,8 +2339,8 @@
 
             if (col == null)
             {
-                //would get null pointer on next line anyway, so throw exception
-                throw new DynaSqlException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());
+                // would get null pointer on next line anyway, so throw exception
+                throw new ModelException("Invalid column '" + idxColumn.getName() + "' on index " + index.getName() + " for table " + table.getName());
             }
             if (idx > 0)
             {

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/sybase/SybasePlatform.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/sybase/SybasePlatform.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/sybase/SybasePlatform.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/sybase/SybasePlatform.java Thu Oct 12 10:20:48 2006
@@ -32,7 +32,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.ddlutils.DynaSqlException;
+import org.apache.ddlutils.DatabaseOperationException;
 import org.apache.ddlutils.PlatformInfo;
 import org.apache.ddlutils.model.Database;
 import org.apache.ddlutils.model.Table;
@@ -134,7 +134,7 @@
     	}
     	catch (SQLException ex)
     	{
-    		throw new DynaSqlException(ex);
+    		throw new DatabaseOperationException(ex);
     	}
     	finally
     	{
@@ -146,7 +146,7 @@
     /**
      * {@inheritDoc}
      */
-	protected Object extractColumnValue(ResultSet resultSet, String columnName, int columnIdx, int jdbcType) throws SQLException
+	protected Object extractColumnValue(ResultSet resultSet, String columnName, int columnIdx, int jdbcType) throws DatabaseOperationException, SQLException
 	{
         boolean useIdx = (columnName == null);
 
@@ -184,8 +184,8 @@
 				}
 				catch (IOException ex)
 				{
-					throw new DynaSqlException("Error while extracting the value of column " + columnName + " of type " +
-							                   TypeMap.getJdbcTypeName(jdbcType) + " from a result set", ex);
+					throw new DatabaseOperationException("Error while extracting the value of column " + columnName + " of type " +
+							                             TypeMap.getJdbcTypeName(jdbcType) + " from a result set", ex);
 				}
 			}
 		}
@@ -226,7 +226,7 @@
 	/**
      * {@inheritDoc}
      */
-	public List fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DynaSqlException
+	public List fetch(Database model, String sql, Collection parameters, Table[] queryHints, int start, int end) throws DatabaseOperationException
 	{
 		setTextSize(MAX_TEXT_SIZE);
 		return super.fetch(model, sql, parameters, queryHints, start, end);
@@ -235,7 +235,7 @@
     /**
      * {@inheritDoc}
      */
-	public List fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DynaSqlException
+	public List fetch(Database model, String sql, Table[] queryHints, int start, int end) throws DatabaseOperationException
 	{
 		setTextSize(MAX_TEXT_SIZE);
 		return super.fetch(model, sql, queryHints, start, end);
@@ -244,7 +244,7 @@
     /**
      * {@inheritDoc}
      */
-	public Iterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DynaSqlException
+	public Iterator query(Database model, String sql, Collection parameters, Table[] queryHints) throws DatabaseOperationException
 	{
 		setTextSize(MAX_TEXT_SIZE);
 		return super.query(model, sql, parameters, queryHints);
@@ -253,7 +253,7 @@
     /**
      * {@inheritDoc}
      */
-	public Iterator query(Database model, String sql, Table[] queryHints) throws DynaSqlException
+	public Iterator query(Database model, String sql, Table[] queryHints) throws DatabaseOperationException
 	{
 		setTextSize(MAX_TEXT_SIZE);
 		return super.query(model, sql, queryHints);

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java?view=diff&rev=463330&r1=463329&r2=463330
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java Thu Oct 12 10:20:48 2006
@@ -141,7 +141,7 @@
         }
         catch (Exception ex)
         {
-            throw new DynaSqlException(ex);
+            throw new DatabaseOperationException(ex);
         }
 
         _databaseName = props.getProperty(PLATFORM_PROPERTY);
@@ -151,7 +151,7 @@
             _databaseName = new PlatformUtils().determineDatabaseType(_dataSource);
             if (_databaseName == null)
             {
-                throw new DynaSqlException("Could not determine platform from datasource, please specify it in the jdbc.properties via the ddlutils.platform property");
+                throw new DatabaseOperationException("Could not determine platform from datasource, please specify it in the jdbc.properties via the ddlutils.platform property");
             }
         }
     }
@@ -212,7 +212,7 @@
      * @param schemaXml The XML database schema
      * @return The parsed database model
      */
-    protected Database createDatabase(String schemaXml) throws DynaSqlException
+    protected Database createDatabase(String schemaXml) throws DatabaseOperationException
     {
     	Database model = parseDatabaseFromString(schemaXml);
 
@@ -225,7 +225,7 @@
      * 
      * @param model The model
      */
-    protected void createDatabase(Database model) throws DynaSqlException
+    protected void createDatabase(Database model) throws DatabaseOperationException
     {
         try
         {
@@ -236,7 +236,7 @@
         }
         catch (Exception ex)
         {
-            throw new DynaSqlException(ex);
+            throw new DatabaseOperationException(ex);
         }
     }
 
@@ -246,7 +246,7 @@
      * @param schemaXml The model XML
      * @return The model object
      */
-    protected Database alterDatabase(String schemaXml) throws DynaSqlException
+    protected Database alterDatabase(String schemaXml) throws DatabaseOperationException
     {
         Database model = parseDatabaseFromString(schemaXml);
 
@@ -259,7 +259,7 @@
      * 
      * @param model The model
      */
-    protected void alterDatabase(Database model) throws DynaSqlException
+    protected void alterDatabase(Database model) throws DatabaseOperationException
     {
         Properties props   = getTestProperties();
         String     catalog = props.getProperty(DDLUTILS_PROPERTY_PREFIX + "catalog");
@@ -275,7 +275,7 @@
         }
         catch (Exception ex)
         {
-            throw new DynaSqlException(ex);
+            throw new DatabaseOperationException(ex);
         }
     }
 
@@ -285,7 +285,7 @@
      * @param dataXml The data xml
      * @return The database
      */
-    protected Database insertData(String dataXml) throws DynaSqlException
+    protected Database insertData(String dataXml) throws DatabaseOperationException
     {
         try
         {
@@ -298,23 +298,16 @@
         }
         catch (Exception ex)
         {
-            throw new DynaSqlException(ex);
+            throw new DatabaseOperationException(ex);
         }
     }
 
     /**
      * Drops the tables defined in the database model.
      */
-    protected void dropDatabase() throws DynaSqlException
+    protected void dropDatabase() throws DatabaseOperationException
     {
-        try
-        {
-            getPlatform().dropTables(_model, true);
-        }
-        catch (Exception ex)
-        {
-            throw new DynaSqlException(ex);
-        }
+        getPlatform().dropTables(_model, true);
     }
 
     /**



Mime
View raw message