|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.store.adapter.CatalogInfoCache
Used to access all database metadata that is catalog information. Includes catalog info on tables, columns, primary keys, foreign keys, and indexes. Some of this information is pre-read for all tables and cached in order to reduce the number of catalog queries made to the database.
The store manager keeps a soft reference to one of these objects and delegates its catalog info calls to it. It keeps a hard reference for the duration of any class add operation, which is the primary consumer of catalog info.
Constructor Summary | |
CatalogInfoCache(DatabaseAdapter dba,
java.lang.String catalogName,
java.lang.String schemaName)
Contructs a new catalog info cache for the specified database schema. |
Method Summary | |
java.util.List |
getColumnInfo(TableName tableName,
java.sql.Connection conn)
Returns the column info for a database table. |
java.util.List |
getForeignKeyInfo(TableName tableName,
java.sql.Connection conn)
Returns the foreign key info for a database table. |
java.util.List |
getIndexInfo(TableName tableName,
java.sql.Connection conn)
Returns the index info for a database table. |
java.util.List |
getPrimaryKeyInfo(TableName tableName,
java.sql.Connection conn)
Returns the primary key info for a database table. |
TableInfo |
getTableInfo(TableName tableName,
java.sql.Connection conn)
Returns the table info for a database table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CatalogInfoCache(DatabaseAdapter dba, java.lang.String catalogName, java.lang.String schemaName)
dba
- the database adaptercatalogName
- the database catalog name, or null
if not applicable.schemaName
- the database schema name, or null
if not applicable.Method Detail |
public TableInfo getTableInfo(TableName tableName, java.sql.Connection conn) throws java.sql.SQLException
tableName
- the name of the table (or view)conn
- a connection to the database
TableInfo
object describing the table. If no info is
found for the given table, null
is returned.
java.sql.SQLException
public java.util.List getColumnInfo(TableName tableName, java.sql.Connection conn) throws java.sql.SQLException
tableName
- the name of the table (or view)conn
- a connection to the database
ColumnInfo
objects describing the columns of the
table. The list is in the same order as was supplied by
getColumns(). If no column info is found for the given table, an
empty list is returned.
java.sql.SQLException
public java.util.List getPrimaryKeyInfo(TableName tableName, java.sql.Connection conn) throws java.sql.SQLException
tableName
- the name of the tableconn
- a connection to the database
PrimaryKeyInfo
objects describing the primary keys
of the table. The list is in the same order as was supplied by
getPrimaryKeys(). If no primary key info is found for the given
table, an empty list is returned.
java.sql.SQLException
public java.util.List getForeignKeyInfo(TableName tableName, java.sql.Connection conn) throws java.sql.SQLException
tableName
- the name of the tableconn
- a connection to the database
ForeignKeyInfo
objects describing the foreign keys
of the table. The list is in the same order as was supplied by
getImportedKeys(). If no foreign key info is found for the given
table, an empty list is returned.
java.sql.SQLException
public java.util.List getIndexInfo(TableName tableName, java.sql.Connection conn) throws java.sql.SQLException
tableName
- the name of the tableconn
- a connection to the database
IndexInfo
objects describing the indexes
of the table. The list is in the same order as was supplied by
getImportedKeys(). If no index info is found for the given
table, an empty list is returned.
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |