Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortle2008-04-29 22:12:35 +0000
committertle2008-04-29 22:12:35 +0000
commit62193f5f20adb4b3a1a501d3d4c1c69308452fe0 (patch)
tree3437f27294fab9ae393ac748931eadb88b6672ef
parent53429766a6f2e134df41dffa810a30a0afe454cc (diff)
downloadwebtools.dali-62193f5f20adb4b3a1a501d3d4c1c69308452fe0.tar.gz
webtools.dali-62193f5f20adb4b3a1a501d3d4c1c69308452fe0.tar.xz
webtools.dali-62193f5f20adb4b3a1a501d3d4c1c69308452fe0.zip
228047 Defaults for entity level caching ... - patch from Pascal
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java22
1 files changed, 17 insertions, 5 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java
index 7285cbfe8e..f33a87a30a 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.ui/src/org/eclipse/jpt/eclipselink/ui/internal/caching/CacheSizeComposite.java
@@ -46,11 +46,10 @@ public class CacheSizeComposite extends AbstractPane<EntityCacheProperties>
}
private WritablePropertyValueModel<Integer> buildCacheSizeHolder() {
- return new PropertyAspectAdapter<EntityCacheProperties, Integer>(getSubjectHolder(), Caching.CACHE_SIZE_PROPERTY) {
+ return new PropertyAspectAdapter<EntityCacheProperties, Integer>(getSubjectHolder(), EntityCacheProperties.CACHE_SIZE_PROPERTY) {
@Override
protected Integer buildValue_() {
Integer value = subject.getCacheSize();
-
if (value == null) {
value = -1;
}
@@ -67,11 +66,24 @@ public class CacheSizeComposite extends AbstractPane<EntityCacheProperties>
};
}
+ private PropertyValueModel<Caching> buildCachingHolder() {
+ return new TransformationPropertyValueModel<EntityCacheProperties, Caching>(getSubjectHolder()) {
+ @Override
+ protected Caching transform_(EntityCacheProperties value) {
+ return value.getCaching();
+ }
+ };
+ }
+
private PropertyValueModel<Integer> buildDefaultCacheSizeHolder() {
- return new TransformationPropertyValueModel<EntityCacheProperties, Integer>(getSubjectHolder()) {
+ return new PropertyAspectAdapter<Caching, Integer>(buildCachingHolder(), Caching.CACHE_SIZE_DEFAULT_PROPERTY) {
@Override
- protected Integer transform_(EntityCacheProperties value) {
- return value.getDefaultCacheSize();
+ protected Integer buildValue_() {
+ Integer value = subject.getCacheSizeDefault();
+ if (value == null) {
+ value = subject.getDefaultCacheSizeDefault();
+ }
+ return value;
}
};
}

Back to the top