cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/3] cayenne git commit: CAY-2494 Rename dbImport tag from 'config' to 'dbImport'
Date Thu, 15 Nov 2018 11:09:55 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master b580bdad3 -> 8523da7df


CAY-2494 Rename dbImport tag from 'config' to 'dbImport'


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

Branch: refs/heads/master
Commit: dd9bf2ecb9d88687d9b5bcce5c5553f33a7299a9
Parents: 8f6cfd7
Author: Arseni Bulatski <ancarseni@gmail.com>
Authored: Mon Nov 12 15:06:29 2018 +0300
Committer: Arseni Bulatski <ancarseni@gmail.com>
Committed: Mon Nov 12 15:08:14 2018 +0300

----------------------------------------------------------------------
 RELEASE-NOTES.txt                                              | 1 +
 .../cayenne/dbsync/reverse/dbimport/ReverseEngineering.java    | 2 +-
 .../main/java/org/apache/cayenne/dbsync/xml/ConfigHandler.java | 6 +++++-
 .../org/apache/cayenne/dbsync/xml/DbImportLoaderDelegate.java  | 2 +-
 .../main/resources/org/apache/cayenne/schema/10/dbimport.xsd   | 1 +
 5 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/dd9bf2ec/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index fd08cdc..4f11513 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -25,6 +25,7 @@ CAY-2485 Compact Slf4j Logger
 CAY-2487 Removed usage of CayenneException.
 CAY-2489 Add validation to the case of not to PK relationships
 CAY-2491 Remaster Db Import View
+CAY-2494 Rename dbImport tag from 'config' to 'dbImport'
 
 Bug Fixes:
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/dd9bf2ec/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ReverseEngineering.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ReverseEngineering.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ReverseEngineering.java
index 4e0321d..d5b3b97 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ReverseEngineering.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ReverseEngineering.java
@@ -291,7 +291,7 @@ public class ReverseEngineering extends SchemaContainer implements Serializable,
 
     @Override
     public void encodeAsXML(XMLEncoder encoder, ConfigurationNodeVisitor delegate) {
-        encoder.start("config")
+        encoder.start("dbImport")
                 .attribute("xmlns", DbImportExtension.NAMESPACE)
                 .nested(this.getIncludeTables(), delegate)
                 .nested(this.getExcludeTables(), delegate)

http://git-wip-us.apache.org/repos/asf/cayenne/blob/dd9bf2ec/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/ConfigHandler.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/ConfigHandler.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/ConfigHandler.java
index e522d89..87680ea 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/ConfigHandler.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/ConfigHandler.java
@@ -38,7 +38,8 @@ import org.xml.sax.SAXException;
  */
 class ConfigHandler extends NamespaceAwareNestedTagHandler {
 
-    public static final String CONFIG_TAG = "config";
+    static final String OLD_CONFIG_TAG = "config";
+    static final String CONFIG_TAG = "dbImport";
 
     private static final String CATALOG_TAG = "catalog";
     private static final String SCHEMA_TAG = "schema";
@@ -77,6 +78,9 @@ class ConfigHandler extends NamespaceAwareNestedTagHandler {
             case CONFIG_TAG:
                 createConfig();
                 return true;
+            case OLD_CONFIG_TAG:
+                createConfig();
+                return true;
         }
 
         return false;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/dd9bf2ec/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/DbImportLoaderDelegate.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/DbImportLoaderDelegate.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/DbImportLoaderDelegate.java
index e777665..03b59af 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/DbImportLoaderDelegate.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/xml/DbImportLoaderDelegate.java
@@ -41,7 +41,7 @@ class DbImportLoaderDelegate implements LoaderDelegate {
 
     @Override
     public NamespaceAwareNestedTagHandler createHandler(NamespaceAwareNestedTagHandler parent,
String tag) {
-        if(ConfigHandler.CONFIG_TAG.equals(tag)) {
+        if(ConfigHandler.CONFIG_TAG.equals(tag) || ConfigHandler.OLD_CONFIG_TAG.equals(tag))
{
             return new ConfigHandler(parent, metaData);
         }
         return null;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/dd9bf2ec/cayenne-server/src/main/resources/org/apache/cayenne/schema/10/dbimport.xsd
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/resources/org/apache/cayenne/schema/10/dbimport.xsd b/cayenne-server/src/main/resources/org/apache/cayenne/schema/10/dbimport.xsd
index a100799..1d4777e 100644
--- a/cayenne-server/src/main/resources/org/apache/cayenne/schema/10/dbimport.xsd
+++ b/cayenne-server/src/main/resources/org/apache/cayenne/schema/10/dbimport.xsd
@@ -22,6 +22,7 @@
            xmlns:dbi="http://cayenne.apache.org/schema/10/dbimport"
            xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="10">
 
+    <xs:element name="dbImport" substitutionGroup="dbi:config"/>
     <xs:element name="config">
         <xs:complexType>
             <xs:complexContent>


Mime
View raw message