public abstract class CustomLinkResolver extends Object implements LinkResolver
Database and Table classes.  In order to
 consume linked tables in non-mdb files, they need to somehow be coerced
 into the appropriate form.  The approach taken by this utility is to make
 it easy to copy the external tables into a temporary mdb file for
 consumption by the primary database.
 The primary features of this utility:
loadCustomFile(com.healthmarketscience.jackcess.Database, java.lang.String)loadCustomTable(com.healthmarketscience.jackcess.Database, java.lang.Object, java.lang.String)| Modifier and Type | Field and Description | 
|---|---|
static Database.FileFormat | 
DEFAULT_FORMAT
the default file format used for temp dbs 
 | 
static boolean | 
DEFAULT_IN_MEMORY
temp dbs default to the filesystem, not in memory 
 | 
static Path | 
DEFAULT_TEMP_DIR
temp dbs end up in the system temp dir by default 
 | 
DEFAULT| Modifier and Type | Method and Description | 
|---|---|
Database | 
resolveLinkedDatabase(Database linkerDb,
                     String linkeeFileName)
Custom implementation is: 
 | 
public static final Database.FileFormat DEFAULT_FORMAT
public static final boolean DEFAULT_IN_MEMORY
public static final Path DEFAULT_TEMP_DIR
public Database resolveLinkedDatabase(Database linkerDb, String linkeeFileName) throws IOException
   // attempt to load the linkeeFileName as a custom file
   Object customFile = loadCustomFile(linkerDb, linkeeFileName);
   if(customFile != null) {
     // this is a custom file, create and return relevant temp db
     return createTempDb(customFile, getDefaultFormat(), isDefaultInMemory(),
                         getDefaultTempDirectory());
   }
   // not a custmom file, load using the default behavior
   return LinkResolver.DEFAULT.resolveLinkedDatabase(linkerDb, linkeeFileName);resolveLinkedDatabase in interface LinkResolverIOExceptionloadCustomFile(com.healthmarketscience.jackcess.Database, java.lang.String), 
createTempDb(java.lang.Object, com.healthmarketscience.jackcess.Database.FileFormat, boolean, java.nio.file.Path, boolean), 
LinkResolver.DEFAULTCopyright © 2005–2025 OpenHMS. All rights reserved.