From 482ba4844a366f6d606314ad4c9dd22723bc5f8d Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Fri, 2 Aug 2013 03:45:50 +0000 Subject: [PATCH] update docs for 2.x api git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@768 f203690c-595d-4dc9-a70b-905162fa7fd2 --- TODO.txt | 2 ++ src/site/xdoc/cookbook.xml | 21 +++++++++++---------- src/site/xdoc/index.xml | 31 ++++++++++++++++--------------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/TODO.txt b/TODO.txt index 6095fe0..2de5697 100644 --- a/TODO.txt +++ b/TODO.txt @@ -61,6 +61,8 @@ Refactor goals: - make non-thread-safeness more explicit - refactor free-space handlers Table/Column? - update index/cookbook for new api +- add basic walk-through in class javadocs to guide users to correct classes + and basic getting started stuff. * public api final cleanup: * Database diff --git a/src/site/xdoc/cookbook.xml b/src/site/xdoc/cookbook.xml index b32e725..2d0ec1b 100644 --- a/src/site/xdoc/cookbook.xml +++ b/src/site/xdoc/cookbook.xml @@ -9,11 +9,11 @@

This cookbook will attempt to familiarize the reader with the various - nooks and crannies of the Jackcess API. The API is large due to the - large feature-set that an Access Database provides, so this cookbook - will by no means be exhaustive. However, this will hopefully give the - reader enough useful building blocks such that the rest of the API can - be discovered and utilized as necessary. + nooks and crannies of the Jackcess 2.x API. The API is large due to + the large feature-set that an Access Database provides, so this + cookbook will by no means be exhaustive. However, this will hopefully + give the reader enough useful building blocks such that the rest of + the API can be discovered and utilized as necessary.

This cookbook is a cross between a tutorial and a reference, so the @@ -48,7 +48,7 @@ Database class.

- Database db = Database.open(new File("mydb.mdb")); + Database db = DatabaseBuilder.open(new File("mydb.mdb"));

That's it, now you have a Database instance (maybe this isn't that @@ -76,11 +76,12 @@ is the best way to interact with the data in a Table, for the sake of simplicity when just getting started, we will use the simplified iteration provided by the Table class itself. When reading row - data, it is generally provided as a Map<String,Object> where the keys are the column + data, it is generally provided as a Row where the keys are the column names and the values are the strongly typed column values.

- for(Map<String,Object> row : table) { + for(Row row : table) { System.out.prinln("Look ma, a row: " + row); } @@ -112,7 +113,7 @@ their values like so:

- Map<String,Object> row = ...; + Row row = ...; for(Column column : table.getColumns()) { String columnName = column.getName(); Object value = row.get(columnName); @@ -191,7 +192,7 @@ is possible may be out of date).

- As of version 1.2.10, Jackcess supports: + As of version 2.0.0, Jackcess supports: