Base class for system tables. Includes a factory method which returns the
most complete implementation available in the jar. This base implementation
knows the names of all system tables but returns null for any system table.
This class has been developed from scratch to replace the previous
DatabaseInformation implementations.
withContent state flag -- if true, contentful tables are to be produced, else
empty (surrogate) tables are to be produced.
Constructor Summary
DatabaseInformation(Database db) Constructs a new DatabaseInformation instance which knows the names of
all system tables (isSystemTable()) but simpy returns null for all
getSystemTable() requests.
getSystemTable(Session session, String name) Retrieves a table with the specified name whose content may depend on
the execution context indicated by the session argument as well as the
current value of withContent.
final boolean
isSystemTable(String name) Tests if the specified name is that of a system table.
state flag -- if true, contentful tables are to be produced, else
empty (surrogate) tables are to be produced. This allows faster
database startup where user views reference system tables and faster
system table structural reflection for table metadata.
Constructs a new DatabaseInformation instance which knows the names of
all system tables (isSystemTable()) but simpy returns null for all
getSystemTable() requests.
Parameters: db - The Database object for which to produce system tables throws: HsqlException - never (required for descendents)
Retrieves a table with the specified name whose content may depend on
the execution context indicated by the session argument as well as the
current value of withContent.
Parameters: session - the context in which to produce the table Parameters: name - the name of the table to produce throws: HsqlException - if a database access error occurs a table corresponding to the name and session arguments, ornull if there is no such table to be produced
Factory method retuns the fullest system table producer
implementation available. This instantiates implementations beginning
with the most complete, finally choosing an empty table producer
implemenation (this class) if no better instance can be constructed.
Parameters: db - The Database object for which to produce system tables the fullest system table producerimplementation available throws: HsqlException - never - required by constructor
Controls caching of all tables produced by this object.
Subclasses are free to ignore this, since they may choose an
implementation that does not dynamically generate and/or cache
table content on an as-needed basis.
If not ignored, this call indicates to this object that all cached
table data may be dirty, requiring a complete cache clear at some
point.
Subclasses are free to delay cache clear until next getSystemTable().
However, subclasses may have to be aware of additional methods with
semantics similar to getSystemTable() and act accordingly (e.g.
clearing earlier than next invocation of getSystemTable()).
setWithContent
final void setWithContent(boolean withContent)(Code)
Switches this table producer between producing empty (surrogate)
or contentful tables.
Parameters: withContent - if true, then produce contentful tables, elseproduce emtpy (surrogate) tables