db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r384913 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
Date Fri, 10 Mar 2006 20:47:00 GMT
Author: tomdz
Date: Fri Mar 10 12:46:58 2006
New Revision: 384913

URL: http://svn.apache.org/viewcvs?rev=384913&view=rev
Log:
Fixed DDLUTILS-78 as suggested by Ludovic MaƮtre

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java?rev=384913&r1=384912&r2=384913&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java Fri Mar 10 12:46:58
2006
@@ -198,6 +198,27 @@
     }
 
     /**
+     * Reads the database model from the given input source.
+     *
+     * @param source The input source
+     * @return The database model
+     */
+    public Database read(InputSource source) throws DdlUtilsException
+    {
+        Database model = null;
+
+        try
+        {
+            model = (Database)getReader().parse(source);
+        }
+        catch (Exception ex)
+        {
+            throw new DdlUtilsException(ex);
+        }
+        model.initialize();
+        return model;
+    }
+    /**
      * Writes the database model to the specified file.
      * 
      * @param model    The database model



Mime
View raw message