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
    public void createDatabase(String jdbcDriverClassName, String connectionUrl, String username, String password, Map parameters) throws DynaSqlException, UnsupportedOperationException    {        // For McKoi, you create databases by simply appending "?create=true" to the connection url        if (JDBC_DRIVER.equals(jdbcDriverClassName))        {            StringBuffer creationUrl = new StringBuffer();            Connection   connection  = null;            creationUrl.append(connectionUrl);            // TODO: It might be safer to parse the URN and check whethere there is already a parameter there            //       (in which case e'd have to use '&' instead)            creationUrl.append("?create=true");            if ((parameters != null) && !parameters.isEmpty())            {                for (Iterator it = parameters.entrySet().iterator(); it.hasNext();)                {                    Map.Entry entry = (Map.Entry)it.next();                    // no need to specify create twice (and create=false wouldn't help anyway)                    if (!"create".equalsIgnoreCase(entry.getKey().toString()))                    {                        creationUrl.append("&");                        creationUrl.append(entry.getKey().toString());                        creationUrl.append("=");                        if (entry.getValue() != null)                        {                            creationUrl.append(entry.getValue().toString());                        }                    }                }            }            if (getLog().isDebugEnabled())            {                getLog().debug("About to create database using this URL: "+creationUrl.toString());            }            try            {                Class.forName(jdbcDriverClassName);                connection = DriverManager.getConnection(creationUrl.toString(), username, password);                logWarnings(connection);            }            catch (Exception ex)            {                throw new DynaSqlException("Error while trying to create a database", ex);            }            finally            {                if (connection != null)                {                    try                    {                        connection.close();                    }                    catch (SQLException ex)                    {}                }            }        }        else        {            throw new UnsupportedOperationException("Unable to create a Derby database via the driver "+jdbcDriverClassName);        }    }