Updated DataMapAdapter to valid Property Adapter semantics.
Project: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/commit/0e1ca18d Tree: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/tree/0e1ca18d Diff: http://git-wip-us.apache.org/repos/asf/cayenne-modeler/diff/0e1ca18d Branch: refs/heads/master Commit: 0e1ca18da4aa44f08cce202a685638935cafc6f9 Parents: d4dc76c Author: mrg <[email protected]> Authored: Mon Sep 26 08:58:51 2016 -0400 Committer: mrg <[email protected]> Committed: Mon Sep 26 08:58:51 2016 -0400 ---------------------------------------------------------------------- .../modeler/adapters/DataMapAdapter.java | 77 +++++++++----------- .../cayenne/modeler/layout/DataMapLayout.java | 8 +- .../modeler/project/DataMapTreeItem.java | 2 +- 3 files changed, 38 insertions(+), 49 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/0e1ca18d/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 13534f2..0c1e4f9 100644 --- a/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java +++ b/src/main/java/org/apache/cayenne/modeler/adapters/DataMapAdapter.java @@ -109,60 +109,49 @@ public class DataMapAdapter extends CayennePropertyAdapter // implements Adapter // this.dataMapAdapter = new BeanPathAdapter<DataMap>(dataMap); } - public StringProperty getNameProperty() - { - return nameProperty; - } + public StringProperty nameProperty() { return nameProperty; } + public String getName() { return nameProperty.get(); } + public void setName(final String value) { nameProperty.set(value); } - public StringProperty getLocationProperty() - { - return locationProperty; - } + public StringProperty locationProperty() { return locationProperty; } + public String getLocationProperty() { return locationProperty.get(); } + public void setLocationProperty(final String value) { locationProperty.set(value); } - public BooleanProperty getQuoteSQLIdentifiersProperty() - { - return quoteSQLIdentifiersProperty; - } + public BooleanProperty quoteSQLIdentifiersProperty() { return quoteSQLIdentifiersProperty; } + public Boolean getQuoteSQLIdentifiersProperty() { return quoteSQLIdentifiersProperty.get(); } + public void setQuoteSQLIdentifiersProperty(final Boolean value) { quoteSQLIdentifiersProperty.set(value); } - public StringProperty getDefaultCatalogProperty() - { - return defaultCatalogProperty; - } + public StringProperty defaultCatalogProperty() { return defaultCatalogProperty; } + public String getDefaultCatalogProperty() { return defaultCatalogProperty.get(); } + public void setDefaultCatalogProperty(final String value) { defaultCatalogProperty.set(value); } - public StringProperty getDefaultSchemaProperty() - { - return defaultSchemaProperty; - } + public StringProperty defaultSchemaProperty() { return defaultSchemaProperty; } + public String getDefaultSchemaProperty() { return defaultSchemaProperty.get(); } + public void setDefaultSchemaProperty(final String value) { defaultSchemaProperty.set(value); } - public StringProperty getDefaultPackageProperty() - { - return defaultPackageProperty; - } + public StringProperty defaultPackageProperty() { return defaultPackageProperty; } + public String getDefaultPackageProperty() { return defaultPackageProperty.get(); } + public void setDefaultPackageProperty(final String value) { defaultPackageProperty.set(value); } - public StringProperty getDefaultSuperclassProperty() - { - return defaultSuperclassProperty; - } + public StringProperty defaultSuperclassProperty() { return defaultSuperclassProperty; } + public String getDefaultSuperclassProperty() { return defaultSuperclassProperty.get(); } + public void setDefaultSuperclassProperty(final String value) { defaultSuperclassProperty.set(value); } - public IntegerProperty getDefaultLockTypeProperty() - { - return defaultLockTypeProperty; - } + public IntegerProperty defaultLockTypeProperty() { return defaultLockTypeProperty; } + public Integer getDefaultLockTypeProperty() { return defaultLockTypeProperty.get(); } + public void setDefaultLockTypeProperty(final Integer value) { defaultLockTypeProperty.set(value); } - public BooleanProperty getClientSupportedProperty() - { - return clientSupportedProperty; - } + public BooleanProperty clientSupportedProperty() { return clientSupportedProperty; } + public Boolean getClientSupportedProperty() { return clientSupportedProperty.get(); } + public void setClientSupportedProperty(final Boolean value) { clientSupportedProperty.set(value); } - public StringProperty getDefaultClientPackageProperty() - { - return defaultClientPackageProperty; - } + public StringProperty defaultClientPackageProperty() { return defaultClientPackageProperty; } + public String getDefaultClientPackageProperty() { return defaultClientPackageProperty.get(); } + public void setDefaultClientPackageProperty(final String value) { defaultClientPackageProperty.set(value); } - public StringProperty getDefaultClientSuperclassProperty() - { - return defaultClientSuperclassProperty; - } + public StringProperty defaultClientSuperclassProperty() { return defaultClientSuperclassProperty; } + public String getDefaultClientSuperclassProperty() { return defaultClientSuperclassProperty.get(); } + public void setDefaultClientSuperclassProperty(final String value) { defaultClientSuperclassProperty.set(value); } public List<ObjectEntityAdapter> getObjectEntityAdapters() { http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/0e1ca18d/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 6120dca..1fc8ad5 100644 --- a/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java +++ b/src/main/java/org/apache/cayenne/modeler/layout/DataMapLayout.java @@ -61,8 +61,8 @@ public class DataMapLayout { LOGGER.debug("begin editing " + this); - dataMapNameTextField.textProperty().bindBidirectional(dataMapAdapter.getNameProperty()); - quoteSqlIdentifiersCheckBox.selectedProperty().bindBidirectional(dataMapAdapter.getQuoteSQLIdentifiersProperty()); + dataMapNameTextField.textProperty().bindBidirectional(dataMapAdapter.nameProperty()); + quoteSqlIdentifiersCheckBox.selectedProperty().bindBidirectional(dataMapAdapter.quoteSQLIdentifiersProperty()); } @Override @@ -70,7 +70,7 @@ public class DataMapLayout { LOGGER.debug("end editing " + this); - dataMapNameTextField.textProperty().unbindBidirectional(dataMapAdapter.getNameProperty()); - quoteSqlIdentifiersCheckBox.selectedProperty().unbindBidirectional(dataMapAdapter.getQuoteSQLIdentifiersProperty()); + dataMapNameTextField.textProperty().unbindBidirectional(dataMapAdapter.nameProperty()); + quoteSqlIdentifiersCheckBox.selectedProperty().unbindBidirectional(dataMapAdapter.quoteSQLIdentifiersProperty()); } } http://git-wip-us.apache.org/repos/asf/cayenne-modeler/blob/0e1ca18d/src/main/java/org/apache/cayenne/modeler/project/DataMapTreeItem.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/cayenne/modeler/project/DataMapTreeItem.java b/src/main/java/org/apache/cayenne/modeler/project/DataMapTreeItem.java index 37f1598..4f5a446 100644 --- a/src/main/java/org/apache/cayenne/modeler/project/DataMapTreeItem.java +++ b/src/main/java/org/apache/cayenne/modeler/project/DataMapTreeItem.java @@ -33,7 +33,7 @@ public class DataMapTreeItem extends TreeItem<String> implements CayenneTreeItem { this.dataMapAdapter = dataMapAdapter; - valueProperty().bindBidirectional(dataMapAdapter.getNameProperty()); + valueProperty().bindBidirectional(dataMapAdapter.nameProperty()); setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.CUBES, TREE_ICON_SIZE)); parent.getChildren().add(this); setExpanded(true);
