From 0db19a5fd195085ba371e8c5c67a9b86619d9cd1 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Thu, 18 Apr 2013 22:56:43 +0000 Subject: [PATCH] more api cleanup git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/jackcess-2@707 f203690c-595d-4dc9-a70b-905162fa7fd2 --- TODO.txt | 2 ++ .../healthmarketscience/jackcess/Database.java | 18 +++--------------- .../jackcess/impl/DatabaseImpl.java | 8 ++++++++ .../jackcess/PropertiesTest.java | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/TODO.txt b/TODO.txt index a8187f3..da157ad 100644 --- a/TODO.txt +++ b/TODO.txt @@ -46,3 +46,5 @@ Refactor goals: * add reason to unsupop throws for indexes * remove static methods in CursorImpl/IndexCursorImpl * create ComplexValue.Id and keep RowId +* public api final cleanup: + * Database diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java index ff9a5fd..0044f26 100644 --- a/src/java/com/healthmarketscience/jackcess/Database.java +++ b/src/java/com/healthmarketscience/jackcess/Database.java @@ -92,7 +92,7 @@ public interface Database extends Iterable, Closeable, Flushable /** (boolean) system property which can be used to indicate that the current * vm has a poor nio implementation (specifically for - * FileChannel.transferFrom) + * {@code FileChannel.transferFrom}) * @usage _intermediate_field_ */ public static final String BROKEN_NIO_PROPERTY = @@ -149,7 +149,7 @@ public interface Database extends Iterable
, Closeable, Flushable public File getFile(); /** - * @return The names of all of the user tables (String) + * @return The names of all of the user tables * @usage _general_method_ */ public Set getTableNames() throws IOException; @@ -174,7 +174,7 @@ public interface Database extends Iterable
, Closeable, Flushable public Iterator
iterator(); /** - * @param name Table name + * @param name Table name (case-insensitive) * @return The table, or null if it doesn't exist * @usage _general_method_ */ @@ -260,18 +260,6 @@ public interface Database extends Iterable
, Closeable, Flushable */ public void close() throws IOException; - /** - * @return The system catalog table - * @usage _advanced_method_ - */ - public Table getSystemCatalog(); - - /** - * @return The system Access Control Entries table (loaded on demand) - * @usage _advanced_method_ - */ - public Table getAccessControlEntries() throws IOException; - /** * Gets the currently configured ErrorHandler (always non-{@code null}). * This will be used to handle all errors unless overridden at the Table or diff --git a/src/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java b/src/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java index a6122f8..4e8f4fb 100644 --- a/src/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java +++ b/src/java/com/healthmarketscience/jackcess/impl/DatabaseImpl.java @@ -580,10 +580,18 @@ public class DatabaseImpl implements Database return _format; } + /** + * @return The system catalog table + * @usage _advanced_method_ + */ public TableImpl getSystemCatalog() { return _systemCatalog; } + /** + * @return The system Access Control Entries table (loaded on demand) + * @usage _advanced_method_ + */ public TableImpl getAccessControlEntries() throws IOException { if(_accessControlEntries == null) { _accessControlEntries = getSystemTable(TABLE_SYSTEM_ACES); diff --git a/test/src/java/com/healthmarketscience/jackcess/PropertiesTest.java b/test/src/java/com/healthmarketscience/jackcess/PropertiesTest.java index 23f1bbf..8cd5a55 100644 --- a/test/src/java/com/healthmarketscience/jackcess/PropertiesTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/PropertiesTest.java @@ -189,7 +189,7 @@ public class PropertiesTest extends TestCase assertTrue(((String)dbProps.getValue(PropertyMap.ACCESS_VERSION_PROP)) .matches("[0-9]{2}[.][0-9]{2}")); - for(Map row : db.getSystemCatalog()) { + for(Map row : ((DatabaseImpl)db).getSystemCatalog()) { int id = (Integer)row.get("Id"); byte[] propBytes = (byte[])row.get("LvProp"); PropertyMaps propMaps = ((DatabaseImpl)db).getPropertiesForObject(id); -- 2.39.5