cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgen...@apache.org
Subject [04/50] cayenne-modeler git commit: Fixed Quote SQL Identifiers.
Date Thu, 05 Jan 2017 22:09:12 GMT
Fixed Quote SQL Identifiers.


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

Branch: refs/heads/master
Commit: 60c9409f9dad5ff9555ff926e2ca67e287a65797
Parents: 1835b7b
Author: mrg <blacknext@gmail.com>
Authored: Thu Sep 22 07:42:51 2016 -0400
Committer: mrg <blacknext@gmail.com>
Committed: Thu Sep 22 07:42:51 2016 -0400

----------------------------------------------------------------------
 .../apache/cayenne/modeler/adapters/DataMapAdapter.java |  3 ++-
 .../apache/cayenne/modeler/layout/DataMapLayout.java    | 12 +++++++++---
 src/main/resources/layouts/DataMapLayout.fxml           |  4 ++--
 3 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/60c9409f/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java b/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java
index afb65d3..368f62a 100644
--- a/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java
+++ b/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java
@@ -73,7 +73,8 @@ public class DataMapAdapter extends CayennePropertyAdapter // implements
Adapter
             nameProperty = JavaBeanStringPropertyBuilder.create().bean(dataMap).name("name").build();
 //            locationProperty = JavaBeanStringPropertyBuilder.create().bean(dataMap).name("map").build();
 
-//            quoteSQLIdentifiersProperty = JavaBeanBooleanPropertyBuilder.create().bean(dataMap).name(DataMap.DEFAULT_QUOTE_SQL_IDENTIFIERS_PROPERTY).build();
+            // TODO: Fix Cayenne?  The DEFAULT_QUOTE_SQL_IDENTIFIERS_PROPERTY constant is
incorrect.
+            quoteSQLIdentifiersProperty = JavaBeanBooleanPropertyBuilder.create().bean(dataMap).name("quotingSQLIdentifiers").build();
 
             defaultCatalogProperty = JavaBeanStringPropertyBuilder.create().bean(dataMap).name(DataMap.DEFAULT_CATALOG_PROPERTY).build();
             defaultSchemaProperty  = JavaBeanStringPropertyBuilder.create().bean(dataMap).name(DataMap.DEFAULT_SCHEMA_PROPERTY).build();

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/60c9409f/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java b/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
index 224472f..6120dca 100644
--- a/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
+++ b/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java
@@ -26,6 +26,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import javafx.fxml.FXML;
+import javafx.scene.control.CheckBox;
 import javafx.scene.control.TextField;
 
 public class DataMapLayout
@@ -37,7 +38,10 @@ public class DataMapLayout
 //    private MainWindowLayout mainWindow;
 
     @FXML
-    private TextField dataMapName;
+    private TextField dataMapNameTextField;
+
+    @FXML
+    private CheckBox quoteSqlIdentifiersCheckBox;
 
     private DataMapAdapter dataMapAdapter;
 
@@ -57,7 +61,8 @@ public class DataMapLayout
     {
         LOGGER.debug("begin editing " + this);
 
-        dataMapName.textProperty().bindBidirectional(dataMapAdapter.getNameProperty());
+        dataMapNameTextField.textProperty().bindBidirectional(dataMapAdapter.getNameProperty());
+        quoteSqlIdentifiersCheckBox.selectedProperty().bindBidirectional(dataMapAdapter.getQuoteSQLIdentifiersProperty());
     }
 
     @Override
@@ -65,6 +70,7 @@ public class DataMapLayout
     {
         LOGGER.debug("end editing " + this);
 
-        dataMapName.textProperty().unbindBidirectional(dataMapAdapter.getNameProperty());
+        dataMapNameTextField.textProperty().unbindBidirectional(dataMapAdapter.getNameProperty());
+        quoteSqlIdentifiersCheckBox.selectedProperty().unbindBidirectional(dataMapAdapter.getQuoteSQLIdentifiersProperty());
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/60c9409f/src/main/resources/layouts/DataMapLayout.fxml
----------------------------------------------------------------------
diff --git a/src/main/resources/layouts/DataMapLayout.fxml b/src/main/resources/layouts/DataMapLayout.fxml
index 293ec55..46cc985 100644
--- a/src/main/resources/layouts/DataMapLayout.fxml
+++ b/src/main/resources/layouts/DataMapLayout.fxml
@@ -47,9 +47,9 @@
                </rowConstraints>
                <children>
                   <Label alignment="CENTER_RIGHT" text="Name: " />
-                  <TextField fx:id="dataMapName" maxWidth="-Infinity" minWidth="-Infinity"
prefWidth="200.0" GridPane.columnIndex="1" />
+                  <TextField fx:id="dataMapNameTextField" maxWidth="-Infinity" minWidth="-Infinity"
prefWidth="200.0" GridPane.columnIndex="1" />
                   <Label text="DataNode: " GridPane.rowIndex="2" />
-                  <CheckBox mnemonicParsing="false" text="Quote SQL Identifiers" GridPane.columnIndex="1"
GridPane.rowIndex="3" />
+                  <CheckBox fx:id="quoteSqlIdentifiersCheckBox" mnemonicParsing="false"
text="Quote SQL Identifiers" GridPane.columnIndex="1" GridPane.rowIndex="3" />
                   <Label text="File: " GridPane.rowIndex="1" />
                   <Label text="filename...is this redundant?  it's in the title bar..."
GridPane.columnIndex="1" GridPane.rowIndex="1" />
                   <ComboBox prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2"
/>


Mime
View raw message