aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2006-09-25 01:48:48 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2006-09-25 01:48:48 +0000
commit71e5528cb02efdf7596611b77443a0aff6e145e6 (patch)
tree3fec2f3a0838fcb26bdd002522418eff07251797
parent23423a0a369af9187e74615f09299c39fd337e60 (diff)
downloadjackcess-71e5528cb02efdf7596611b77443a0aff6e145e6.tar.gz
jackcess-71e5528cb02efdf7596611b77443a0aff6e145e6.zip
save set of lookup columns
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@121 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/java/com/healthmarketscience/jackcess/Database.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java
index 24e5e4e..3529e62 100644
--- a/src/java/com/healthmarketscience/jackcess/Database.java
+++ b/src/java/com/healthmarketscience/jackcess/Database.java
@@ -42,6 +42,7 @@ import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -72,7 +73,7 @@ public class Database
SID[0] = (byte) 0xA6;
SID[1] = (byte) 0x33;
}
-
+
/** Batch commit size for copying other result sets into this database */
private static final int COPY_TABLE_BATCH_SIZE = 200;
@@ -117,6 +118,11 @@ public class Database
private static final String TABLE_SYSTEM_ACES = "MSysACEs";
/** System object type for table definitions */
private static final Short TYPE_TABLE = (short) 1;
+
+ /** the columns to read when reading system catalog initially */
+ private static Collection<String> SYSTEM_CATALOG_COLUMNS =
+ new HashSet<String>(Arrays.asList(COL_NAME, COL_TYPE, COL_ID));
+
/**
* All of the reserved words in Access that should be escaped when creating
@@ -266,8 +272,7 @@ public class Database
}
_systemCatalog = new Table(_buffer, _pageChannel, _format, PAGE_SYSTEM_CATALOG, "System Catalog");
Map row;
- while ( (row = _systemCatalog.getNextRow(Arrays.asList(
- COL_NAME, COL_TYPE, COL_ID))) != null)
+ while ( (row = _systemCatalog.getNextRow(SYSTEM_CATALOG_COLUMNS)) != null)
{
String name = (String) row.get(COL_NAME);
if (name != null && TYPE_TABLE.equals(row.get(COL_TYPE))) {