Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortle2008-11-10 16:21:22 +0000
committertle2008-11-10 16:21:22 +0000
commit67954bde783577d4f06da86125a24d5e65914f3e (patch)
tree182277e7b01bcfb2a78c7f23a126195b9996a5fb
parentbfd63b1e3698a1ecd40e2ef6a97b7b1a639c85f3 (diff)
downloadwebtools.dali-67954bde783577d4f06da86125a24d5e65914f3e.tar.gz
webtools.dali-67954bde783577d4f06da86125a24d5e65914f3e.tar.xz
webtools.dali-67954bde783577d4f06da86125a24d5e65914f3e.zip
Refactored initializeProperties
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/persistence/logging/EclipseLinkLogging.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/persistence/logging/EclipseLinkLogging.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/persistence/logging/EclipseLinkLogging.java
index 864532677b..1f50d82e9c 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/persistence/logging/EclipseLinkLogging.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/context/persistence/logging/EclipseLinkLogging.java
@@ -56,15 +56,23 @@ public class EclipseLinkLogging extends EclipseLinkPersistenceUnitProperties
this.logFileLocation =
this.getStringValue(ECLIPSELINK_LOG_FILE_LOCATION);
+ this.logger = this.getLoggerProtertyValue();
+ }
+
+ /**
+ * Gets the Logger property from the persistence unit.
+ */
+ private String getLoggerProtertyValue() {
+
Logger standardLogger = this.getEnumValue(ECLIPSELINK_LOGGER, Logger.values());
if( ! this.getPersistenceUnit().containsProperty(ECLIPSELINK_LOGGER)) {
- this.logger = null;
+ return null; // no property found
}
else if(standardLogger == null) {
- this.logger = this.getStringValue(ECLIPSELINK_LOGGER); // custom logger
+ return this.getStringValue(ECLIPSELINK_LOGGER); // custom logger
}
else {
- this.logger = getEclipseLinkStringValueOf(standardLogger);
+ return getEclipseLinkStringValueOf(standardLogger); // a Logger
}
}

Back to the top