Interface TableNameMap

  • All Superinterfaces:
    Iterable<NameMap.Record>, NameMap
    All Known Implementing Classes:
    TableNameMapImpl

    public interface TableNameMap
    extends NameMap
    The name map of a table, which ms access stores in the "NameMap" property of the table. It holds a record for the table, a record for each column, and a record for each name which an expression in the table uses.

    Ms access leaves the records different from the table in some cases: a table renamed from the navigation pane keeps its old name in the table record until the next design save, and some tables carry the name map of another table, with guids which are not their own. A column name is the more reliable way to find a column record.

    Author:
    James Ahlborn
    Usage:
    Intermediate: This class requires moderate API knowledge.
    • Method Detail

      • getTableRecord

        NameMap.Record getTableRecord()
        Returns:
        the record for the table, or null if there is none
      • getColumnRecord

        NameMap.Record getColumnRecord​(String name)
        Returns:
        the column record with the given name (case-insensitive), or null if there is none
      • getReferences

        List<NameMap.Record> getReferences()
        Returns:
        the records for the names which expressions in the table use, in the order of the name map
      • removeColumn

        NameMap.Record removeColumn​(String name)
        Removes the column record with the given name (case-insensitive).
        Returns:
        the removed record, or null if there is none
      • findMismatches

        List<NameMap.Mismatch> findMismatches()
                                       throws IOException
        Compares the table and column records with the table which holds this name map. A column is found by its guid, and by its name when it has no guid or no record carries it.
        Specified by:
        findMismatches in interface NameMap
        Returns:
        every difference, empty if the name map agrees with the table
        Throws:
        IOException
      • save

        void save()
           throws IOException
        Writes the name map into the table property and saves the properties of the table.
        Throws:
        IOException