Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2017-10-02 16:13:27 +0000
committerBrian Vosburgh2017-10-02 16:13:27 +0000
commit44a8baa7727400232063b97c7db910fcb389b43d (patch)
treef3a9bd3ec01b3bfc6fead956e5e501ed69c2c303
parenta6cc38ef3dbc1a8ff81849faee447ddf26008212 (diff)
downloadwebtools.dali-44a8baa7727400232063b97c7db910fcb389b43d.tar.gz
webtools.dali-44a8baa7727400232063b97c7db910fcb389b43d.tar.xz
webtools.dali-44a8baa7727400232063b97c7db910fcb389b43d.zip
temp (staged)
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkTenantDiscriminatorColumnComposite.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/caching/EclipseLinkEntityCachingPropertyComposite.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceXmlSchemaGenerationComposite.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractBasicMappingComposite.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractIdMappingComposite.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractInheritanceComposite.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractVersionMappingComposite.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ColumnComposite.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/DiscriminatorColumnComposite.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/EntityNameCombo.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GenerationComposite.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GeneratorComposite.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdClassChooser.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdMappingGenerationComposite.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnsComposite.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinTableJoiningStrategyPane.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentAttributeDetailsPageManager.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentTypeDetailsPageManager.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TargetEntityClassChooser.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/java/JavaPrimaryKeyJoinColumnsComposite.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/AbstractElementCollectionMappingComposite2_0.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/EmbeddedIdMappingMappedByRelationshipPane2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/IdMappingMappedByRelationshipPane2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/TargetClassChooser2_0.java14
30 files changed, 259 insertions, 326 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java
index 8dcbb7db3a..6114bbabb7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkExpiryComposite.java
@@ -257,30 +257,27 @@ public class EclipseLinkExpiryComposite
}
private PropertyValueModel<Boolean> buildTimeToLiveExpiryEnabler() {
- return new PropertyAspectAdapterXXXX<EclipseLinkCaching, Boolean>(getSubjectHolder(), EclipseLinkCaching.EXPIRY_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.getExpiry() != null);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkCaching.EXPIRY_PROPERTY,
+ m -> Boolean.valueOf(m.getExpiry() != null)
+ );
}
private PropertyValueModel<Boolean> buildTimeOfDayExpiryEnabler() {
- return new PropertyAspectAdapterXXXX<EclipseLinkCaching, Boolean>(getSubjectHolder(), EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.getExpiryTimeOfDay() != null);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY,
+ m -> Boolean.valueOf(m.getExpiryTimeOfDay() != null)
+ );
}
private PropertyValueModel<EclipseLinkTimeOfDay> buildTimeOfDayExpiryModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkCaching, EclipseLinkTimeOfDay>(getSubjectHolder(), EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY) {
- @Override
- protected EclipseLinkTimeOfDay buildValue_() {
- return this.subject.getExpiryTimeOfDay();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkCaching.EXPIRY_TIME_OF_DAY_PROPERTY,
+ m -> m.getExpiryTimeOfDay()
+ );
}
private ModifiablePropertyValueModel<Integer> buildTimeOfDayExpiryHourModel(PropertyValueModel<EclipseLinkTimeOfDay> timeOfDayExpiryHolder) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkTenantDiscriminatorColumnComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkTenantDiscriminatorColumnComposite.java
index 3f158843e1..c0208c6921 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkTenantDiscriminatorColumnComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/details/EclipseLinkTenantDiscriminatorColumnComposite.java
@@ -354,12 +354,11 @@ public class EclipseLinkTenantDiscriminatorColumnComposite
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkTenantDiscriminatorColumn2_3, Integer>(getSubjectHolder(), NamedDiscriminatorColumn.DEFAULT_LENGTH_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultLength());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ NamedDiscriminatorColumn.DEFAULT_LENGTH_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultLength())
+ );
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/caching/EclipseLinkEntityCachingPropertyComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/caching/EclipseLinkEntityCachingPropertyComposite.java
index 4653fb3103..4e3ebb92b9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/caching/EclipseLinkEntityCachingPropertyComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/caching/EclipseLinkEntityCachingPropertyComposite.java
@@ -99,16 +99,11 @@ public class EclipseLinkEntityCachingPropertyComposite
}
private PropertyValueModel<EclipseLinkCacheType> buildDefaultCacheTypeModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkCaching, EclipseLinkCacheType>(buildCachingModel(), EclipseLinkCaching.CACHE_TYPE_DEFAULT_PROPERTY) {
- @Override
- protected EclipseLinkCacheType buildValue_() {
- EclipseLinkCacheType cacheType = this.subject.getCacheTypeDefault();
- if (cacheType == null) {
- cacheType = this.subject.getDefaultCacheTypeDefault();
- }
- return cacheType;
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ buildCachingModel(),
+ EclipseLinkCaching.CACHE_TYPE_DEFAULT_PROPERTY,
+ m -> (m.getCacheTypeDefault() != null) ? m.getCacheTypeDefault() : m.getDefaultCacheTypeDefault()
+ );
}
private PropertyChangeListener buildDefaultCachingTypePropertyChangeListener() {
@@ -223,16 +218,11 @@ public class EclipseLinkEntityCachingPropertyComposite
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkCaching, Integer>(buildCachingModel(), EclipseLinkCaching.CACHE_SIZE_DEFAULT_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- Integer size = this.subject.getCacheSizeDefault();
- if (size == null) {
- size = this.subject.getDefaultCacheSizeDefault();
- }
- return size;
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ buildCachingModel(),
+ EclipseLinkCaching.CACHE_SIZE_DEFAULT_PROPERTY,
+ m -> (m.getCacheSizeDefault() != null) ? m.getCacheSizeDefault() : m.getDefaultCacheSizeDefault()
+ );
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java
index 03c0e55cd5..aadf287c43 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/customization/EclipseLinkProfilerClassChooser.java
@@ -21,6 +21,7 @@ import org.eclipse.jpt.common.utility.internal.iterator.IteratorTools;
import org.eclipse.jpt.common.utility.internal.model.value.CompositeListValueModel;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimpleCollectionValueModel;
import org.eclipse.jpt.common.utility.internal.model.value.SortedListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
@@ -94,12 +95,11 @@ public class EclipseLinkProfilerClassChooser
}
private PropertyValueModel<String> buildDefaultProfilerModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkCustomization, String>(this.getSubjectHolder(), EclipseLinkCustomization.DEFAULT_PROFILER) {
- @Override
- protected String buildValue_() {
- return EclipseLinkProfilerClassChooser.this.getDefaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkCustomization.DEFAULT_PROFILER,
+ m -> EclipseLinkProfilerClassChooser.this.getDefaultValue(m)
+ );
}
private ListValueModel<String> buildDefaultProfilerListModel() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java
index 654e97ec8c..fcc7fd86c1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkLoggerClassChooser.java
@@ -21,6 +21,7 @@ import org.eclipse.jpt.common.utility.internal.iterator.IteratorTools;
import org.eclipse.jpt.common.utility.internal.model.value.CompositeListValueModel;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimpleCollectionValueModel;
import org.eclipse.jpt.common.utility.internal.model.value.SortedListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
@@ -100,12 +101,11 @@ public class EclipseLinkLoggerClassChooser
}
private PropertyValueModel<String> buildDefaultLoggerModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkLogging, String>(this.getSubjectHolder(), EclipseLinkLogging.DEFAULT_LOGGER) {
- @Override
- protected String buildValue_() {
- return EclipseLinkLoggerClassChooser.this.getDefaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkLogging.DEFAULT_LOGGER,
+ m -> EclipseLinkLoggerClassChooser.this.getDefaultValue(m)
+ );
}
private ListValueModel<String> buildDefaultLoggerListModel() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java
index 1042be074e..b79efc92c1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceUnitOptionsEditorPage.java
@@ -250,12 +250,11 @@ public class EclipseLinkPersistenceUnitOptionsEditorPage
//******** session name *********
private PropertyValueModel<String> buildDefaultSessionNameModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkOptions, String>(this.optionsModel, EclipseLinkOptions.DEFAULT_SESSION_NAME) {
- @Override
- protected String buildValue_() {
- return EclipseLinkPersistenceUnitOptionsEditorPage.this.getSessionNameDefaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.optionsModel,
+ EclipseLinkOptions.DEFAULT_SESSION_NAME,
+ m -> getSessionNameDefaultValue(m)
+ );
}
private ListValueModel<String> buildDefaultSessionNameListModel() {
@@ -303,12 +302,11 @@ public class EclipseLinkPersistenceUnitOptionsEditorPage
//******** sessions xml *********
private PropertyValueModel<String> buildDefaultSessionsXmlFileNameModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkOptions, String>(this.optionsModel, EclipseLinkOptions.DEFAULT_SESSIONS_XML) {
- @Override
- protected String buildValue_() {
- return EclipseLinkPersistenceUnitOptionsEditorPage.this.getSessionsXmlDefaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.optionsModel,
+ EclipseLinkOptions.DEFAULT_SESSIONS_XML,
+ m -> getSessionsXmlDefaultValue(m)
+ );
}
private ListValueModel<String> buildDefaultSessionsXmlFileNameListModel() {
@@ -356,12 +354,11 @@ public class EclipseLinkPersistenceUnitOptionsEditorPage
//******** target database *********
private PropertyValueModel<String> buildDefaultTargetDatabaseModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkOptions, String>(this.optionsModel, EclipseLinkOptions.DEFAULT_TARGET_DATABASE) {
- @Override
- protected String buildValue_() {
- return EclipseLinkPersistenceUnitOptionsEditorPage.this.getTargetDatabaseDefaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.optionsModel,
+ EclipseLinkOptions.DEFAULT_TARGET_DATABASE,
+ m -> getTargetDatabaseDefaultValue(m)
+ );
}
private ListValueModel<String> buildDefaultTargetDatabaseListModel() {
@@ -520,12 +517,11 @@ public class EclipseLinkPersistenceUnitOptionsEditorPage
//******** target server *********
private PropertyValueModel<String> buildDefaultTargetServerModel() {
- return new PropertyAspectAdapterXXXX<EclipseLinkOptions, String>(this.optionsModel, EclipseLinkOptions.DEFAULT_TARGET_SERVER) {
- @Override
- protected String buildValue_() {
- return EclipseLinkPersistenceUnitOptionsEditorPage.this.getTargetServerDefaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.optionsModel,
+ EclipseLinkOptions.DEFAULT_TARGET_SERVER,
+ m -> getTargetServerDefaultValue(m)
+ );
}
private ListValueModel<String> buildDefaultTargetServerListModel() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceXmlSchemaGenerationComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceXmlSchemaGenerationComposite.java
index ca5110cdda..42dc43afed 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceXmlSchemaGenerationComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/persistence/options/EclipseLinkPersistenceXmlSchemaGenerationComposite.java
@@ -17,6 +17,7 @@ import org.eclipse.jpt.common.ui.internal.widgets.FolderChooserComboPane;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerTools;
import org.eclipse.jpt.common.utility.model.value.ListValueModel;
import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
@@ -189,12 +190,11 @@ public class EclipseLinkPersistenceXmlSchemaGenerationComposite
//************ Create DDL file name ************
private PropertyValueModel<String> buildDefaultCreateDdlFileNameHolder() {
- return new PropertyAspectAdapterXXXX<EclipseLinkSchemaGeneration, String>(this.getSubjectHolder(), EclipseLinkSchemaGeneration.DEFAULT_CREATE_FILE_NAME) {
- @Override
- protected String buildValue_() {
- return EclipseLinkPersistenceXmlSchemaGenerationComposite.this.getDefaultCreateFileNameValue(subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkSchemaGeneration.DEFAULT_CREATE_FILE_NAME,
+ m -> getDefaultCreateFileNameValue(m)
+ );
}
private ListValueModel<String> buildDefaultCreateDdlFileNameListHolder() {
@@ -243,12 +243,11 @@ public class EclipseLinkPersistenceXmlSchemaGenerationComposite
private PropertyValueModel<String> buildDefaultDropDdlFileNameHolder() {
- return new PropertyAspectAdapterXXXX<EclipseLinkSchemaGeneration, String>(this.getSubjectHolder(), EclipseLinkSchemaGeneration.DEFAULT_DROP_FILE_NAME) {
- @Override
- protected String buildValue_() {
- return EclipseLinkPersistenceXmlSchemaGenerationComposite.this.getDefaultDropDdlFileNameValue(subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ EclipseLinkSchemaGeneration.DEFAULT_DROP_FILE_NAME,
+ m -> getDefaultDropDdlFileNameValue(m)
+ );
}
private ListValueModel<String> buildDefaultDropDdlFileNameListHolder() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractBasicMappingComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractBasicMappingComposite.java
index 231b72b30e..9a7e02f825 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractBasicMappingComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractBasicMappingComposite.java
@@ -181,12 +181,11 @@ public abstract class AbstractBasicMappingComposite<M extends BasicMapping>
}
protected PropertyValueModel<Converter> buildConverterModel() {
- return new PropertyAspectAdapterXXXX<M, Converter>(getSubjectHolder(), ConvertibleMapping.CONVERTER_PROPERTY) {
- @Override
- protected Converter buildValue_() {
- return this.subject.getConverter();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ ConvertibleMapping.CONVERTER_PROPERTY,
+ m -> m.getConverter()
+ );
}
protected PropertyValueModel<BaseTemporalConverter> buildTemporalConverterModel(PropertyValueModel<Converter> converterModel) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractIdMappingComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractIdMappingComposite.java
index 29dfc714e5..4679006c3f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractIdMappingComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractIdMappingComposite.java
@@ -134,12 +134,11 @@ public abstract class AbstractIdMappingComposite<M extends IdMapping>
}
protected PropertyValueModel<Converter> buildConverterModel() {
- return new PropertyAspectAdapterXXXX<M, Converter>(getSubjectHolder(), ConvertibleMapping.CONVERTER_PROPERTY) {
- @Override
- protected Converter buildValue_() {
- return this.subject.getConverter();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ ConvertibleMapping.CONVERTER_PROPERTY,
+ m -> m.getConverter()
+ );
}
protected PropertyValueModel<BaseTemporalConverter> buildTemporalConverterModel(PropertyValueModel<Converter> converterModel) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractInheritanceComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractInheritanceComposite.java
index 3a4777cda7..23c9f39cd6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractInheritanceComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractInheritanceComposite.java
@@ -119,13 +119,12 @@ public abstract class AbstractInheritanceComposite<T extends Entity>
pkJoinColumnsComposite.setLayoutData(gridData);
}
- protected ModifiablePropertyValueModel<Boolean> buildDiscriminatorValueEnabledHolder() {
- return new PropertyAspectAdapterXXXX<Entity, Boolean>(getSubjectHolder(), Entity.SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.specifiedDiscriminatorValueIsAllowed());
- }
- };
+ protected PropertyValueModel<Boolean> buildDiscriminatorValueEnabledHolder() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Entity.SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY,
+ m -> Boolean.valueOf(m.specifiedDiscriminatorValueIsAllowed())
+ );
}
private ListValueModel<String> buildDefaultDiscriminatorListValueHolder() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractVersionMappingComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractVersionMappingComposite.java
index 6fc05f5d6c..f2aec0e98d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractVersionMappingComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/AbstractVersionMappingComposite.java
@@ -143,12 +143,11 @@ public abstract class AbstractVersionMappingComposite<M extends VersionMapping>
}
protected PropertyValueModel<Converter> buildConverterModel() {
- return new PropertyAspectAdapterXXXX<VersionMapping, Converter>(getSubjectHolder(), ConvertibleMapping.CONVERTER_PROPERTY) {
- @Override
- protected Converter buildValue_() {
- return this.subject.getConverter();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ ConvertibleMapping.CONVERTER_PROPERTY,
+ m -> m.getConverter()
+ );
}
protected PropertyValueModel<BaseTemporalConverter> buildTemporalConverterModel(PropertyValueModel<Converter> converterModel) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ColumnComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ColumnComposite.java
index a854602dfd..100fc69973 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ColumnComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/ColumnComposite.java
@@ -442,12 +442,11 @@ public class ColumnComposite
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<Column, Integer>(getSubjectHolder(), Column.DEFAULT_LENGTH_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultLength());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Column.DEFAULT_LENGTH_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultLength())
+ );
}
@Override
@@ -483,12 +482,11 @@ public class ColumnComposite
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<Column, Integer>(getSubjectHolder(), Column.DEFAULT_PRECISION_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultPrecision());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Column.DEFAULT_PRECISION_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultPrecision())
+ );
}
@Override
@@ -526,12 +524,11 @@ public class ColumnComposite
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<Column, Integer>(getSubjectHolder(), Column.DEFAULT_SCALE_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultScale());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Column.DEFAULT_SCALE_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultScale())
+ );
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/DiscriminatorColumnComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/DiscriminatorColumnComposite.java
index bcce04e80e..f1f126bb9d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/DiscriminatorColumnComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/DiscriminatorColumnComposite.java
@@ -262,13 +262,12 @@ public class DiscriminatorColumnComposite<T extends Entity> extends Pane<T> {
};
}
- protected ModifiablePropertyValueModel<Boolean> buildDiscriminatorColumnEnabledModel() {
- return new PropertyAspectAdapterXXXX<Entity, Boolean>(getSubjectHolder(), Entity.SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf( this.subject != null && this.subject.specifiedDiscriminatorColumnIsAllowed());
- }
- };
+ protected PropertyValueModel<Boolean> buildDiscriminatorColumnEnabledModel() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Entity.SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY,
+ m -> Boolean.valueOf(m.specifiedDiscriminatorColumnIsAllowed())
+ );
}
@SuppressWarnings("unused")
@@ -288,12 +287,11 @@ public class DiscriminatorColumnComposite<T extends Entity> extends Pane<T> {
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<SpecifiedDiscriminatorColumn, Integer>(getSubjectHolder(), NamedDiscriminatorColumn.DEFAULT_LENGTH_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultLength());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ NamedDiscriminatorColumn.DEFAULT_LENGTH_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultLength())
+ );
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/EntityNameCombo.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/EntityNameCombo.java
index 24c4b99d99..7a8a093319 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/EntityNameCombo.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/EntityNameCombo.java
@@ -12,7 +12,6 @@ package org.eclipse.jpt.jpa.ui.internal.details;
import org.eclipse.jpt.common.ui.JptCommonUiMessages;
import org.eclipse.jpt.common.ui.internal.swt.widgets.ComboTools;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerTools;
@@ -87,12 +86,11 @@ public class EntityNameCombo
}
private PropertyValueModel<String> buildDefaultEntityNameModel() {
- return new PropertyAspectAdapterXXXX<Entity, String>(getSubjectHolder(), Entity.DEFAULT_NAME_PROPERTY) {
- @Override
- protected String buildValue_() {
- return defaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Entity.DEFAULT_NAME_PROPERTY,
+ m -> defaultValue(m)
+ );
}
private ModifiablePropertyValueModel<String> buildEntityNameModel() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GenerationComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GenerationComposite.java
index c815220938..f60916d3b3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GenerationComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GenerationComposite.java
@@ -12,9 +12,10 @@ package org.eclipse.jpt.jpa.ui.internal.details;
import org.eclipse.jpt.common.ui.internal.swt.bindings.SWTBindingTools;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimplePropertyValueModel;
-import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
+import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jpa.core.context.GeneratorContainer;
import org.eclipse.jpt.jpa.core.context.SequenceGenerator;
import org.eclipse.jpt.jpa.core.context.TableGenerator;
@@ -142,12 +143,11 @@ public class GenerationComposite extends Pane<GeneratorContainer>
}
protected PropertyValueModel<SequenceGenerator> buildSequenceGeneratorHolder() {
- return new PropertyAspectAdapterXXXX<GeneratorContainer, SequenceGenerator>(getSubjectHolder(), GeneratorContainer.SEQUENCE_GENERATOR_PROPERTY) {
- @Override
- protected SequenceGenerator buildValue_() {
- return this.subject.getSequenceGenerator();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ GeneratorContainer.SEQUENCE_GENERATOR_PROPERTY,
+ m -> m.getSequenceGenerator()
+ );
}
protected GeneratorBuilder<SequenceGenerator> buildSequenceGeneratorBuilder() {
@@ -218,12 +218,11 @@ public class GenerationComposite extends Pane<GeneratorContainer>
}
private PropertyValueModel<TableGenerator> buildTableGeneratorHolder() {
- return new PropertyAspectAdapterXXXX<GeneratorContainer, TableGenerator>(getSubjectHolder(), GeneratorContainer.TABLE_GENERATOR_PROPERTY) {
- @Override
- protected TableGenerator buildValue_() {
- return this.subject.getTableGenerator();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ GeneratorContainer.TABLE_GENERATOR_PROPERTY,
+ m -> m.getTableGenerator()
+ );
}
private GeneratorBuilder<TableGenerator> buildTableGeneratorBuilder() {
@@ -235,12 +234,11 @@ public class GenerationComposite extends Pane<GeneratorContainer>
}
protected PropertyValueModel<Boolean> buildTableGeneratorExpanstionStateHolder() {
- return new PropertyAspectAdapterXXXX<GeneratorContainer, Boolean>(getSubjectHolder(), GeneratorContainer.TABLE_GENERATOR_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.getTableGenerator() != null);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ GeneratorContainer.TABLE_GENERATOR_PROPERTY,
+ m -> Boolean.valueOf(m.getTableGenerator() != null)
+ );
}
private ModifiablePropertyValueModel<Boolean> buildTableGeneratorBooleanHolder() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GeneratorComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GeneratorComposite.java
index dc1987d8eb..71610771c7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GeneratorComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/GeneratorComposite.java
@@ -12,7 +12,6 @@ package org.eclipse.jpt.jpa.ui.internal.details;
import org.eclipse.jpt.common.ui.internal.widgets.IntegerCombo;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerTools;
import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
@@ -110,12 +109,11 @@ public abstract class GeneratorComposite<T extends DatabaseGenerator>
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<DatabaseGenerator, Integer>(getSubjectHolder(), DatabaseGenerator.DEFAULT_ALLOCATION_SIZE_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultAllocationSize());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ DatabaseGenerator.DEFAULT_ALLOCATION_SIZE_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultAllocationSize())
+ );
}
@Override
@@ -148,12 +146,11 @@ public abstract class GeneratorComposite<T extends DatabaseGenerator>
@Override
protected PropertyValueModel<Integer> buildDefaultModel() {
- return new PropertyAspectAdapterXXXX<DatabaseGenerator, Integer>(getSubjectHolder(), DatabaseGenerator.DEFAULT_INITIAL_VALUE_PROPERTY) {
- @Override
- protected Integer buildValue_() {
- return Integer.valueOf(this.subject.getDefaultInitialValue());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ DatabaseGenerator.DEFAULT_INITIAL_VALUE_PROPERTY,
+ m -> Integer.valueOf(m.getDefaultInitialValue())
+ );
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdClassChooser.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdClassChooser.java
index 72b8c4c98c..c915f99e11 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdClassChooser.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdClassChooser.java
@@ -13,7 +13,6 @@ import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jpt.common.ui.JptCommonUiMessages;
import org.eclipse.jpt.common.ui.internal.widgets.ClassChooserComboPane;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.ListValueModel;
@@ -75,13 +74,14 @@ public class IdClassChooser
@Override
protected ListValueModel<String> buildClassListModel() {
- return new PropertyListValueModelAdapter<>(
- new PropertyAspectAdapterXXXX<IdClassReference, String>(
- getSubjectHolder(), IdClassReference.DEFAULT_ID_CLASS_NAME_PROPERTY) {
- @Override
- protected String buildValue_() {
- return defaultText(this.subject);
- }
- });
+ return new PropertyListValueModelAdapter<>(this.buildClassModel());
+ }
+
+ protected PropertyValueModel<String> buildClassModel() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ IdClassReference.DEFAULT_ID_CLASS_NAME_PROPERTY,
+ m -> defaultText(m)
+ );
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdMappingGenerationComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdMappingGenerationComposite.java
index b20f440a73..5c0fdf9d12 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdMappingGenerationComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/IdMappingGenerationComposite.java
@@ -288,13 +288,13 @@ public class IdMappingGenerationComposite
}
private PropertyValueModel<SequenceGenerator> buildSequenceGeneratorModel(PropertyValueModel<GeneratorContainer> generatorModel) {
- return new PropertyAspectAdapterXXXX<GeneratorContainer, SequenceGenerator>(generatorModel, GeneratorContainer.SEQUENCE_GENERATOR_PROPERTY) {
- @Override
- protected SequenceGenerator buildValue_() {
- return this.subject.getSequenceGenerator();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ generatorModel,
+ GeneratorContainer.SEQUENCE_GENERATOR_PROPERTY,
+ m -> m.getSequenceGenerator()
+ );
}
+
private GeneratorBuilder<SequenceGenerator> buildSequenceGeneratorBuilder(final PropertyValueModel<GeneratorContainer> generatorModel) {
return new GeneratorBuilder<SequenceGenerator>() {
public SequenceGenerator addGenerator() {
@@ -352,12 +352,11 @@ public class IdMappingGenerationComposite
}
private PropertyValueModel<TableGenerator> buildTableGeneratorModel(PropertyValueModel<GeneratorContainer> generatorModel) {
- return new PropertyAspectAdapterXXXX<GeneratorContainer, TableGenerator>(generatorModel, GeneratorContainer.TABLE_GENERATOR_PROPERTY) {
- @Override
- protected TableGenerator buildValue_() {
- return this.subject.getTableGenerator();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ generatorModel,
+ GeneratorContainer.TABLE_GENERATOR_PROPERTY,
+ m -> m.getTableGenerator()
+ );
}
private GeneratorBuilder<TableGenerator> buildTableGeneratorBuilder(final PropertyValueModel<GeneratorContainer> generatorModel) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnsComposite.java
index 8f20d5755f..fdb919e202 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnsComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinColumnsComposite.java
@@ -20,8 +20,8 @@ import org.eclipse.jpt.common.utility.internal.iterable.SingleElementIterable;
import org.eclipse.jpt.common.utility.internal.model.value.CompositeListValueModel;
import org.eclipse.jpt.common.utility.internal.model.value.ItemPropertyListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.ListAspectAdapter;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimpleCollectionValueModel;
import org.eclipse.jpt.common.utility.iterable.ListIterable;
import org.eclipse.jpt.common.utility.model.value.CollectionValueModel;
@@ -29,10 +29,10 @@ import org.eclipse.jpt.common.utility.model.value.ListValueModel;
import org.eclipse.jpt.common.utility.model.value.ModifiableCollectionValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jpa.core.JpaModel;
-import org.eclipse.jpt.jpa.core.context.SpecifiedJoinColumn;
import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.JoinColumn;
import org.eclipse.jpt.jpa.core.context.NamedColumn;
+import org.eclipse.jpt.jpa.core.context.SpecifiedJoinColumn;
import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
import org.eclipse.jpt.jpa.ui.internal.JpaHelpContextIds;
import org.eclipse.osgi.util.NLS;
@@ -205,12 +205,11 @@ public class JoinColumnsComposite<T extends JpaModel>
}
private PropertyValueModel<JoinColumn> buildDefaultJoinColumnHolder() {
- return new PropertyAspectAdapterXXXX<T, JoinColumn>(getSubjectHolder(), this.joinColumnsEditor.getDefaultPropertyName()) {
- @Override
- protected JoinColumn buildValue_() {
- return JoinColumnsComposite.this.joinColumnsEditor.getDefaultJoinColumn(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ this.joinColumnsEditor.getDefaultPropertyName(),
+ m -> JoinColumnsComposite.this.joinColumnsEditor.getDefaultJoinColumn(m)
+ );
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinTableJoiningStrategyPane.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinTableJoiningStrategyPane.java
index 88f9a4945b..07335088c3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinTableJoiningStrategyPane.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/JoinTableJoiningStrategyPane.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.ui.internal.details;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
@@ -77,13 +76,11 @@ public class JoinTableJoiningStrategyPane
}
protected PropertyValueModel<JoinTable> buildJoinTableModel() {
- return new PropertyAspectAdapterXXXX<JoinTableRelationshipStrategy, JoinTable>(
- this.buildJoinTableJoiningStrategyModel(), JoinTableRelationshipStrategy.JOIN_TABLE_PROPERTY) {
- @Override
- protected JoinTable buildValue_() {
- return this.subject.getJoinTable();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.buildJoinTableJoiningStrategyModel(),
+ JoinTableRelationshipStrategy.JOIN_TABLE_PROPERTY,
+ m -> m.getJoinTable()
+ );
}
public static ModifiablePropertyValueModel<Boolean> buildUsesJoinTableJoiningStrategyModel(PropertyValueModel<? extends JoinTableRelationship> subjectHolder) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentAttributeDetailsPageManager.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentAttributeDetailsPageManager.java
index 4ac26e9cd8..b0d7bbafd1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentAttributeDetailsPageManager.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentAttributeDetailsPageManager.java
@@ -13,11 +13,9 @@ import java.util.HashMap;
import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jpt.common.ui.WidgetFactory;
import org.eclipse.jpt.common.ui.internal.swt.bindings.SWTBindingTools;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.predicate.CriterionPredicate;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
-import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.common.utility.predicate.Predicate;
import org.eclipse.jpt.common.utility.transformer.Transformer;
@@ -119,16 +117,12 @@ public abstract class PersistentAttributeDetailsPageManager<A extends Persistent
}
- private ModifiablePropertyValueModel<AttributeMapping> buildMappingModel() {
- return new PropertyAspectAdapterXXXX<A, AttributeMapping>(
- getSubjectHolder(),
- PersistentAttribute.MAPPING_PROPERTY)
- {
- @Override
- protected AttributeMapping buildValue_() {
- return this.subject.getMapping();
- }
- };
+ private PropertyValueModel<AttributeMapping> buildMappingModel() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ PersistentAttribute.MAPPING_PROPERTY,
+ m -> m.getMapping()
+ );
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentTypeDetailsPageManager.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentTypeDetailsPageManager.java
index db34589477..aac626e790 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentTypeDetailsPageManager.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PersistentTypeDetailsPageManager.java
@@ -13,7 +13,6 @@ import java.util.HashMap;
import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jpt.common.ui.WidgetFactory;
import org.eclipse.jpt.common.ui.internal.swt.bindings.SWTBindingTools;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.predicate.CriterionPredicate;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
@@ -101,12 +100,11 @@ public class PersistentTypeDetailsPageManager
}
private PropertyValueModel<TypeMapping> buildMappingModel() {
- return new PropertyAspectAdapterXXXX<PersistentType, TypeMapping>(getSubjectHolder(), PersistentType.MAPPING_PROPERTY) {
- @Override
- protected TypeMapping buildValue_() {
- return this.subject.getMapping();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ PersistentType.MAPPING_PROPERTY,
+ m -> m.getMapping()
+ );
}
private Predicate<TypeMapping> buildMappingFilter(final String key) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java
index fc120fdbef..c727108544 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/PrimaryKeyJoinColumnsInSecondaryTableComposite.java
@@ -26,7 +26,6 @@ import org.eclipse.jpt.common.utility.internal.model.value.ItemPropertyListValue
import org.eclipse.jpt.common.utility.internal.model.value.ListAspectAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.ListValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.PluggablePropertyValueModel;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimpleCollectionValueModel;
@@ -38,11 +37,11 @@ import org.eclipse.jpt.common.utility.model.value.ModifiableCollectionValueModel
import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.SpecifiedOrVirtual;
import org.eclipse.jpt.jpa.core.context.NamedColumn;
import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.SecondaryTable;
import org.eclipse.jpt.jpa.core.context.SpecifiedBaseJoinColumn;
+import org.eclipse.jpt.jpa.core.context.SpecifiedOrVirtual;
import org.eclipse.jpt.jpa.core.context.SpecifiedPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.SpecifiedSecondaryTable;
import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
@@ -88,12 +87,11 @@ public class PrimaryKeyJoinColumnsInSecondaryTableComposite
}
private PropertyValueModel<PrimaryKeyJoinColumn> buildDefaultJoinColumnModel() {
- return new PropertyAspectAdapterXXXX<SecondaryTable, PrimaryKeyJoinColumn>(getSubjectHolder(), SecondaryTable.DEFAULT_PRIMARY_KEY_JOIN_COLUMN) {
- @Override
- protected PrimaryKeyJoinColumn buildValue_() {
- return this.subject.getDefaultPrimaryKeyJoinColumn();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ SecondaryTable.DEFAULT_PRIMARY_KEY_JOIN_COLUMN,
+ m -> m.getDefaultPrimaryKeyJoinColumn()
+ );
}
private ListValueModel<PrimaryKeyJoinColumn> buildDefaultPrimaryKeyJoinColumnListModel() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java
index 3f0f7b3fa6..b98874a0cd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TableComposite.java
@@ -14,13 +14,12 @@ import java.util.Collection;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
import org.eclipse.jpt.common.utility.internal.ArrayTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
-import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.SpecifiedSchemaReference;
-import org.eclipse.jpt.jpa.core.context.Table;
import org.eclipse.jpt.jpa.core.context.SpecifiedTable;
+import org.eclipse.jpt.jpa.core.context.Table;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
import org.eclipse.jpt.jpa.ui.details.JptJpaUiDetailsMessages;
@@ -102,23 +101,20 @@ public class TableComposite extends Pane<Entity>
this.addSchemaCombo(subjectHolder, enabledModel, container);
}
- protected ModifiablePropertyValueModel<SpecifiedTable> buildTableHolder() {
-
- return new PropertyAspectAdapterXXXX<Entity, SpecifiedTable>(getSubjectHolder(), Entity.TABLE_IS_UNDEFINED_PROPERTY) {
- @Override
- protected SpecifiedTable buildValue_() {
- return this.subject.tableIsUndefined() ? null : this.subject.getTable();
- }
- };
+ protected PropertyValueModel<SpecifiedTable> buildTableHolder() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Entity.TABLE_IS_UNDEFINED_PROPERTY,
+ m -> m.tableIsUndefined() ? null : m.getTable()
+ );
}
protected PropertyValueModel<Boolean> buildTableEnabledModel() {
- return new PropertyAspectAdapterXXXX<Entity, Boolean>(getSubjectHolder(), Entity.SPECIFIED_TABLE_IS_ALLOWED_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.specifiedTableIsAllowed());
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ Entity.SPECIFIED_TABLE_IS_ALLOWED_PROPERTY,
+ m -> Boolean.valueOf(m.specifiedTableIsAllowed())
+ );
}
private CatalogCombo<SpecifiedTable> addCatalogCombo(PropertyValueModel<SpecifiedTable> tableHolder, PropertyValueModel<Boolean> enabledModel, Composite container) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TargetEntityClassChooser.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TargetEntityClassChooser.java
index 1b62f7c609..55d0ca3bc5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TargetEntityClassChooser.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/TargetEntityClassChooser.java
@@ -17,7 +17,6 @@ import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.ui.JptCommonUiMessages;
import org.eclipse.jpt.common.ui.internal.widgets.ClassChooserComboPane;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.ListValueModel;
@@ -109,12 +108,11 @@ public class TargetEntityClassChooser
}
private PropertyValueModel<String> buildDefaultProfilerModel() {
- return new PropertyAspectAdapterXXXX<RelationshipMapping, String>(this.getSubjectHolder(), RelationshipMapping.DEFAULT_TARGET_ENTITY_PROPERTY) {
- @Override
- protected String buildValue_() {
- return TargetEntityClassChooser.this.defaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ RelationshipMapping.DEFAULT_TARGET_ENTITY_PROPERTY,
+ m -> defaultValue(m)
+ );
}
String defaultValue(RelationshipMapping subject) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/java/JavaPrimaryKeyJoinColumnsComposite.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/java/JavaPrimaryKeyJoinColumnsComposite.java
index 5c1b91752f..c75987e210 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/java/JavaPrimaryKeyJoinColumnsComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/details/java/JavaPrimaryKeyJoinColumnsComposite.java
@@ -10,8 +10,8 @@
package org.eclipse.jpt.jpa.ui.internal.details.java;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.ListValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.jpa.core.context.SpecifiedPrimaryKeyJoinColumn;
@@ -26,25 +26,23 @@ import org.eclipse.swt.widgets.Composite;
* @version 2.0
* @since 2.0
*/
-public class JavaPrimaryKeyJoinColumnsComposite extends AbstractPrimaryKeyJoinColumnsComposite<JavaEntity>
+public class JavaPrimaryKeyJoinColumnsComposite
+ extends AbstractPrimaryKeyJoinColumnsComposite<JavaEntity>
{
- public JavaPrimaryKeyJoinColumnsComposite(Pane<? extends JavaEntity> subjectHolder,
- Composite parent) {
-
+ public JavaPrimaryKeyJoinColumnsComposite(Pane<? extends JavaEntity> subjectHolder, Composite parent) {
super(subjectHolder, parent);
}
@Override
protected ListValueModel<SpecifiedPrimaryKeyJoinColumn> buildDefaultJoinColumnsListModel() {
- return new PropertyListValueModelAdapter<SpecifiedPrimaryKeyJoinColumn>(buildDefaultJoinColumnHolder());
+ return new PropertyListValueModelAdapter<>(buildDefaultJoinColumnHolder());
}
private PropertyValueModel<SpecifiedPrimaryKeyJoinColumn> buildDefaultJoinColumnHolder() {
- return new PropertyAspectAdapterXXXX<JavaEntity, SpecifiedPrimaryKeyJoinColumn>(getSubjectHolder(), JavaEntity.DEFAULT_PRIMARY_KEY_JOIN_COLUMN_PROPERTY) {
- @Override
- protected SpecifiedPrimaryKeyJoinColumn buildValue_() {
- return subject.getDefaultPrimaryKeyJoinColumn();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ JavaEntity.DEFAULT_PRIMARY_KEY_JOIN_COLUMN_PROPERTY,
+ m -> m.getDefaultPrimaryKeyJoinColumn()
+ );
}
} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/AbstractElementCollectionMappingComposite2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/AbstractElementCollectionMappingComposite2_0.java
index cb1b6c71f6..684cfe8160 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/AbstractElementCollectionMappingComposite2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/AbstractElementCollectionMappingComposite2_0.java
@@ -243,13 +243,11 @@ public abstract class AbstractElementCollectionMappingComposite2_0<M extends Ele
}
protected PropertyValueModel<M.Type> buildValueModel() {
- return new PropertyAspectAdapterXXXX<M, M.Type>(
- this.getSubjectHolder(), CollectionMapping.VALUE_TYPE_PROPERTY) {
- @Override
- protected ElementCollectionMapping2_0.Type buildValue_() {
- return this.subject.getValueType();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ CollectionMapping.VALUE_TYPE_PROPERTY,
+ m -> m.getValueType()
+ );
}
private Transformer<M.Type, Control> buildPaneTransformer(Composite container) {
@@ -330,12 +328,11 @@ public abstract class AbstractElementCollectionMappingComposite2_0<M extends Ele
}
protected PropertyValueModel<Converter> buildConverterModel() {
- return new PropertyAspectAdapterXXXX<M, Converter>(getSubjectHolder(), ConvertibleMapping.CONVERTER_PROPERTY) {
- @Override
- protected Converter buildValue_() {
- return this.subject.getConverter();
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ ConvertibleMapping.CONVERTER_PROPERTY,
+ m -> m.getConverter()
+ );
}
private PropertyValueModel<BaseTemporalConverter> buildTemporalConverterModel(PropertyValueModel<Converter> converterModel) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/EmbeddedIdMappingMappedByRelationshipPane2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/EmbeddedIdMappingMappedByRelationshipPane2_0.java
index ab152b7c59..04b47eea0e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/EmbeddedIdMappingMappedByRelationshipPane2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/EmbeddedIdMappingMappedByRelationshipPane2_0.java
@@ -11,9 +11,8 @@ package org.eclipse.jpt.jpa.ui.internal.jpa2.details;
import org.eclipse.jpt.common.ui.internal.swt.bindings.SWTBindingTools;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
-import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.common.utility.transformer.Transformer;
import org.eclipse.jpt.jpa.core.jpa2.context.DerivableIdMapping2_0;
@@ -54,13 +53,12 @@ public class EmbeddedIdMappingMappedByRelationshipPane2_0
return this.mappedByRelationshipLabel;
}
- protected ModifiablePropertyValueModel<Boolean> buildDerivedModel() {
- return new PropertyAspectAdapterXXXX<EmbeddedIdMapping2_0, Boolean>(getSubjectHolder(), DerivableIdMapping2_0.DERIVED_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.isDerived());
- }
- };
+ protected PropertyValueModel<Boolean> buildDerivedModel() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ DerivableIdMapping2_0.DERIVED_PROPERTY,
+ m -> Boolean.valueOf(m.isDerived())
+ );
}
private Transformer<Boolean, Control> buildPaneTransformer(Composite container) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/IdMappingMappedByRelationshipPane2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/IdMappingMappedByRelationshipPane2_0.java
index 7d48cc0332..7db5d38f80 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/IdMappingMappedByRelationshipPane2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/IdMappingMappedByRelationshipPane2_0.java
@@ -11,9 +11,8 @@ package org.eclipse.jpt.jpa.ui.internal.jpa2.details;
import org.eclipse.jpt.common.ui.internal.swt.bindings.SWTBindingTools;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
+import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
-import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
import org.eclipse.jpt.common.utility.transformer.Transformer;
import org.eclipse.jpt.jpa.core.jpa2.context.DerivableIdMapping2_0;
@@ -55,13 +54,12 @@ public class IdMappingMappedByRelationshipPane2_0
return this.mappedByRelationshipLabel;
}
- protected ModifiablePropertyValueModel<Boolean> buildDerivedModel() {
- return new PropertyAspectAdapterXXXX<IdMapping2_0, Boolean>(getSubjectHolder(), DerivableIdMapping2_0.DERIVED_PROPERTY) {
- @Override
- protected Boolean buildValue_() {
- return Boolean.valueOf(this.subject.isDerived());
- }
- };
+ protected PropertyValueModel<Boolean> buildDerivedModel() {
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ DerivableIdMapping2_0.DERIVED_PROPERTY,
+ m -> Boolean.valueOf(m.isDerived())
+ );
}
private Transformer<Boolean, Control> buildPaneTransformer(final Composite container) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/TargetClassChooser2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/TargetClassChooser2_0.java
index fa402d6aa8..0b789e7426 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/TargetClassChooser2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/jpa2/details/TargetClassChooser2_0.java
@@ -13,7 +13,6 @@ import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jpt.common.ui.JptCommonUiMessages;
import org.eclipse.jpt.common.ui.internal.widgets.ClassChooserComboPane;
import org.eclipse.jpt.common.ui.internal.widgets.Pane;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyListValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.model.value.ListValueModel;
@@ -96,12 +95,11 @@ public class TargetClassChooser2_0 extends ClassChooserComboPane<ElementCollecti
}
private PropertyValueModel<String> buildDefaultProfilerModel() {
- return new PropertyAspectAdapterXXXX<ElementCollectionMapping2_0, String>(this.getSubjectHolder(), ElementCollectionMapping2_0.DEFAULT_TARGET_CLASS_PROPERTY) {
- @Override
- protected String buildValue_() {
- return TargetClassChooser2_0.this.defaultValue(this.subject);
- }
- };
+ return PropertyValueModelTools.subjectModelAspectAdapter(
+ this.getSubjectHolder(),
+ ElementCollectionMapping2_0.DEFAULT_TARGET_CLASS_PROPERTY,
+ m -> defaultValue(m)
+ );
}
String defaultValue(ElementCollectionMapping2_0 subject) {
@@ -110,4 +108,4 @@ public class TargetClassChooser2_0 extends ClassChooserComboPane<ElementCollecti
JptCommonUiMessages.DEFAULT_EMPTY :
NLS.bind(JptCommonUiMessages.DEFAULT_WITH_ONE_PARAM, defaultValue);
}
-} \ No newline at end of file
+}

Back to the top