cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [1/2] cayenne git commit: Implement DbRelationship load status
Date Mon, 15 Dec 2014 06:35:56 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 78558aaa4 -> a31ae3b7d


Implement DbRelationship load status


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/470e6b21
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/470e6b21
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/470e6b21

Branch: refs/heads/master
Commit: 470e6b2191f62ce96c126152cb4c59800dfd5721
Parents: 75d49a9
Author: Savva Kolbachev <s.kolbachev@gmail.com>
Authored: Fri Dec 12 14:52:59 2014 +0300
Committer: Savva Kolbachev <s.kolbachev@gmail.com>
Committed: Fri Dec 12 14:52:59 2014 +0300

----------------------------------------------------------------------
 .../modeler/dialog/db/DbLoaderHelper.java       | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/470e6b21/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DbLoaderHelper.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DbLoaderHelper.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DbLoaderHelper.java
index 5d9d1b3..0a878e8 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DbLoaderHelper.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/DbLoaderHelper.java
@@ -21,7 +21,6 @@ package org.apache.cayenne.modeler.dialog.db;
 
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.DbLoader;
-import org.apache.cayenne.access.DbLoaderDelegate;
 import org.apache.cayenne.access.loader.DbLoaderConfiguration;
 import org.apache.cayenne.access.loader.DefaultDbLoaderDelegate;
 import org.apache.cayenne.access.loader.filters.EntityFilters;
@@ -32,6 +31,7 @@ import org.apache.cayenne.configuration.event.DataMapEvent;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.event.EntityEvent;
 import org.apache.cayenne.map.event.MapEvent;
@@ -246,6 +246,24 @@ public class DbLoaderHelper {
             }
         }
 
+        @Override
+        public boolean dbRelationship(DbEntity entity) {
+            checkCanceled();
+
+            loadStatusNote = "Load relationships for '" + entity.getName() + "'...";
+
+            return true;
+        }
+
+        @Override
+        public boolean dbRelationshipLoaded(DbEntity entity, DbRelationship relationship)
{
+            checkCanceled();
+
+            loadStatusNote = "Load relationship: '" + entity.getName() + "'; '" + relationship.getName()
+ "'...";
+
+            return true;
+        }
+
         void checkCanceled() {
             if (isStoppingReverseEngineering()) {
                 throw new CayenneRuntimeException("Reengineering was canceled.");


Mime
View raw message