Package com.healthmarketscience.jackcess
Interface NameMap
-
- All Superinterfaces:
Iterable<NameMap.Record>
- All Known Subinterfaces:
TableNameMap
- All Known Implementing Classes:
NameMapImpl,QueryNameMapImpl,TableNameMapImpl
public interface NameMap extends Iterable<NameMap.Record>
A name map, the data behind the ms access "Name AutoCorrect" option. It holds a record for each table and column an object depends on, tied to the guid in the "GUID" property of that table or column. When a table or column is renamed, ms access finds the old name here and changes the places which use it.Two kinds of object carry one:
- a table, in its "NameMap" property, which
Table.getNameMap()reads as aTableNameMap - a query, in its "DOL" property,
which
Query.getNameMap()reads. It has a table record for each table or query the query uses and a column record for each column it uses. It cannot be changed, because ms access repairs a query when it finds a record whose guid now names an object with a different name, and a record changed without the sql of the query would stop that repair
findMismatches()lists where they do.- Author:
- James Ahlborn
- Usage:
- Intermediate: This class requires moderate API knowledge.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceNameMap.MismatchOne difference between a name map and the database.static classNameMap.MismatchTypeThe kinds of difference between a name map and the database.static interfaceNameMap.RecordOne record of a name map.static classNameMap.RecordTypeThe kinds of record in a name map.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<NameMap.Mismatch>findMismatches()Compares the table and column records with the tables and columns they name.List<NameMap.Record>getColumnRecords()NameMap.RecordgetRecord(String guid)List<NameMap.Record>getTableRecords()IntegergetWriterTag()default Stream<NameMap.Record>stream()-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getTableRecords
List<NameMap.Record> getTableRecords()
- Returns:
- the table records, in the order of the name map
-
getColumnRecords
List<NameMap.Record> getColumnRecords()
- Returns:
- the column records, in the order of the name map
-
getRecord
NameMap.Record getRecord(String guid)
- Returns:
- the first table or column record with the given guid, or
nullif there is none
-
getWriterTag
Integer getWriterTag()
- Returns:
- the tag in the end record, which is a value of the ms access
build which wrote the name map, or
nullif the name map has no end record
-
findMismatches
List<NameMap.Mismatch> findMismatches() throws IOException
Compares the table and column records with the tables and columns they name.- Returns:
- every difference, empty if the name map agrees with the database
- Throws:
IOException
-
stream
default Stream<NameMap.Record> stream()
- Returns:
- a Stream using the default Iterator.
-
-