From: James Ahlborn Date: Thu, 11 May 2017 04:05:28 +0000 (+0000) Subject: provide accessors for defaults config X-Git-Tag: jackcess-2.1.7~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0b1a53e9c4c1cbb0c9379bde5be0c83387a8a8a0;p=jackcess.git provide accessors for defaults config git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1096 f203690c-595d-4dc9-a70b-905162fa7fd2 --- diff --git a/src/main/java/com/healthmarketscience/jackcess/util/CustomLinkResolver.java b/src/main/java/com/healthmarketscience/jackcess/util/CustomLinkResolver.java index 9f4cace..7992d71 100644 --- a/src/main/java/com/healthmarketscience/jackcess/util/CustomLinkResolver.java +++ b/src/main/java/com/healthmarketscience/jackcess/util/CustomLinkResolver.java @@ -100,6 +100,18 @@ public abstract class CustomLinkResolver implements LinkResolver _defaultTempDir = defaultTempDir; } + protected FileFormat getDefaultFormat() { + return _defaultFormat; + } + + protected boolean isDefaultInMemory() { + return _defaultInMemory; + } + + protected File getDefaultTempDirectory() { + return _defaultTempDir; + } + /** * Custom implementation is: *
@@ -108,8 +120,8 @@ public abstract class CustomLinkResolver implements LinkResolver
    *   
    *   if(customFile != null) {
    *     // this is a custom file, create and return relevant temp db
-   *     return createTempDb(customFile, _defaultFormat, _defaultInMemory, 
-   *                         _defaultTempDir);
+   *     return createTempDb(customFile, getDefaultFormat(), isDefaultInMemory(),
+   *                         getDefaultTempDirectory());
    *   }
    *   
    *   // not a custmom file, load using the default behavior
@@ -125,8 +137,8 @@ public abstract class CustomLinkResolver implements LinkResolver
   {
     Object customFile = loadCustomFile(linkerDb, linkeeFileName);
     if(customFile != null) {
-      return createTempDb(customFile, _defaultFormat, _defaultInMemory, 
-                          _defaultTempDir);
+      return createTempDb(customFile, getDefaultFormat(), isDefaultInMemory(), 
+                          getDefaultTempDirectory());
     }
     return LinkResolver.DEFAULT.resolveLinkedDatabase(linkerDb, linkeeFileName);
   }