Class QueryNameMapImpl
- java.lang.Object
-
- com.healthmarketscience.jackcess.impl.NameMapImpl
-
- com.healthmarketscience.jackcess.impl.QueryNameMapImpl
-
- All Implemented Interfaces:
NameMap,Iterable<NameMap.Record>
public class QueryNameMapImpl extends NameMapImpl
The name map of a query, which ms access uses to repair the sql of the query when a table or column it uses is renamed. Its records cannot be changed, for the reasonNameMapgives.- Author:
- James Ahlborn
- Usage:
- Advanced: This class is for advanced/internal use.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.healthmarketscience.jackcess.NameMap
NameMap.Mismatch, NameMap.MismatchType, NameMap.Record, NameMap.RecordType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<NameMap.Mismatch>findMismatches()Compares each record with the table or column its guid names, which is how ms access finds the objects a query uses.static QueryNameMapImplread(byte[] bytes, DatabaseImpl database)-
Methods inherited from class com.healthmarketscience.jackcess.impl.NameMapImpl
getColumnRecords, getRecord, getTableRecords, getWriterTag, iterator, toBytes, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
read
public static QueryNameMapImpl read(byte[] bytes, DatabaseImpl database) throws IOException
- Parameters:
bytes- the value of the name map property of a querydatabase- the database which holds the query- Returns:
- the decoded name map
- Throws:
IOException- if the bytes are not a valid name map
-
findMismatches
public List<NameMap.Mismatch> findMismatches() throws IOException
Compares each record with the table or column its guid names, which is how ms access finds the objects a query uses. A record whose guid names nothing is found by its name instead. A record for a source query is compared with that query, and the column records under it are not checked, because they carry the guids of the table columns the source query reads. The records for a linked table are not checked, because the guid of a link is on the link and not on the table it opens.- Returns:
- every difference, empty if the name map agrees with the database
- Throws:
IOException
-
-