diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2015-03-04 03:31:01 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2015-03-04 03:31:01 +0000 |
commit | babfdb1947d35dc0fa98bd5dc15f2330e956c1f4 (patch) | |
tree | c9cda6e16353082155f8dadb143fca500e3ea1df /src/main/java/com | |
parent | 4ffcf30a2a07d0ff79e68e40210f850110694eee (diff) | |
download | jackcess-babfdb1947d35dc0fa98bd5dc15f2330e956c1f4.tar.gz jackcess-babfdb1947d35dc0fa98bd5dc15f2330e956c1f4.zip |
add some convenience methods for new TableIterableBuilder; add change notes for linked table updates
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@918 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java | 4 | ||||
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/util/TableIterableBuilder.java | 19 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java index 414b43b..bb3bfac 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java @@ -620,8 +620,8 @@ public class DatabaseImpl implements Database return _tableFinder.isLinkedTable(table); } - boolean matchesLinkedTable(Table table, String linkedTableName, - String linkedDbName) { + private boolean matchesLinkedTable(Table table, String linkedTableName, + String linkedDbName) { return (table.getName().equalsIgnoreCase(linkedTableName) && (_linkedDbs != null) && (_linkedDbs.get(linkedDbName) == table.getDatabase())); diff --git a/src/main/java/com/healthmarketscience/jackcess/util/TableIterableBuilder.java b/src/main/java/com/healthmarketscience/jackcess/util/TableIterableBuilder.java index 0390ed0..9563ced 100644 --- a/src/main/java/com/healthmarketscience/jackcess/util/TableIterableBuilder.java +++ b/src/main/java/com/healthmarketscience/jackcess/util/TableIterableBuilder.java @@ -70,6 +70,25 @@ public class TableIterableBuilder implements Iterable<Table> _includeLinkedTables = includeLinkedTables; return this; } + + /** + * Convenience method to set the flags to include only non-linked (local) + * user tables. + */ + public TableIterableBuilder withLocalUserTablesOnly() { + setIncludeNormalTables(true); + setIncludeSystemTables(false); + return setIncludeLinkedTables(false); + } + + /** + * Convenience method to set the flags to include only system tables. + */ + public TableIterableBuilder withSystemTablesOnly() { + setIncludeNormalTables(false); + setIncludeSystemTables(true); + return setIncludeLinkedTables(false); + } public Iterator<Table> iterator() { return ((DatabaseImpl)_db).iterator(this); |