cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmen...@apache.org
Subject svn commit: r764019 - /cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterMojo.java
Date Fri, 10 Apr 2009 19:49:55 GMT
Author: kmenard
Date: Fri Apr 10 19:49:55 2009
New Revision: 764019

URL: http://svn.apache.org/viewvc?rev=764019&view=rev
Log:
I like final.

Modified:
    cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterMojo.java

Modified: cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterMojo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterMojo.java?rev=764019&r1=764018&r2=764019&view=diff
==============================================================================
--- cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterMojo.java
(original)
+++ cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/DbImporterMojo.java
Fri Apr 10 19:49:55 2009
@@ -112,15 +112,15 @@
             final DbLoader loader = new DbLoader(dataSource.getConnection(), adapterInst,
new LoaderDelegate());
 
             mapFile = new File(map);
-            DataMap dataMap = mapFile.exists() ? loadDataMap() : new DataMap();
+            final DataMap dataMap = mapFile.exists() ? loadDataMap() : new DataMap();
             loader.loadDataMapFromDB(schemaName, tablePattern, dataMap);
 
             mapFile.delete();
             PrintWriter pw = new PrintWriter(mapFile);
             dataMap.encodeAsXML(pw);
             pw.close();
-        } catch (Exception ex) {
-            Throwable th = Util.unwindException(ex);
+        } catch (final Exception ex) {
+            final Throwable th = Util.unwindException(ex);
 
             String message = "Error importing database schema";
 
@@ -135,26 +135,26 @@
 
     final class LoaderDelegate implements DbLoaderDelegate {
 
-        public boolean overwriteDbEntity(DbEntity ent) throws CayenneException {
+        public boolean overwriteDbEntity(final DbEntity ent) throws CayenneException {
             return true;
         }
 
-        public void dbEntityAdded(DbEntity ent) {
+        public void dbEntityAdded(final DbEntity ent) {
             logger.info("Added DB entity: " + ent.getName());
             ent.getDataMap().addDbEntity(ent);
         }
 
-        public void dbEntityRemoved(DbEntity ent) {
+        public void dbEntityRemoved(final DbEntity ent) {
             logger.info("Removed DB entity: " + ent.getName());
             ent.getDataMap().removeDbEntity(ent.getName());
         }
 
-        public void objEntityAdded(ObjEntity ent) {
+        public void objEntityAdded(final ObjEntity ent) {
             logger.info("Added obj entity: " + ent.getName());
             ent.getDataMap().addObjEntity(ent);
         }
 
-        public void objEntityRemoved(ObjEntity ent) {
+        public void objEntityRemoved(final ObjEntity ent) {
             logger.info("Removed obj entity: " + ent.getName());
             ent.getDataMap().removeObjEntity(ent.getName());
         }
@@ -162,7 +162,7 @@
 
     /** Loads and returns DataMap based on <code>map</code> attribute. */
     protected DataMap loadDataMap() throws Exception {
-        InputSource in = new InputSource(mapFile.getCanonicalPath());
+        final InputSource in = new InputSource(mapFile.getCanonicalPath());
         return new MapLoader().loadDataMap(in);
     }
 }



Mime
View raw message