1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.healthmarketscience.jackcess.util;
18
19 import java.io.File;
20 import java.io.IOException;
21
22 import com.healthmarketscience.jackcess.Database;
23 import com.healthmarketscience.jackcess.DatabaseBuilder;
24 import com.healthmarketscience.jackcess.impl.DatabaseImpl;
25
26
27
28
29
30
31
32 @FunctionalInterface
33 public interface LinkResolver
34 {
35
36
37
38
39 public static final LinkResolveril/LinkResolver.html#LinkResolver">LinkResolver DEFAULT = new LinkResolver() {
40 @Override
41 public Databasem/healthmarketscience/jackcess/Database.html#Database">Database resolveLinkedDatabase(Database linkerDb,
42 String linkeeFileName)
43 throws IOException
44 {
45
46 boolean readOnly = ((linkerDb instanceof DatabaseImpl) ?
47 ((DatabaseImpl)linkerDb).isReadOnly() : false);
48 return new DatabaseBuilder(new File(linkeeFileName))
49 .setReadOnly(readOnly).open();
50 }
51 };
52
53
54
55
56
57 public Databasem/healthmarketscience/jackcess/Database.html#Database">Database resolveLinkedDatabase(Database linkerDb, String linkeeFileName)
58 throws IOException;
59 }