| java.lang.Object org.netbeans.modules.sql.framework.model.DBMetaDataFactory
DBMetaDataFactory | public class DBMetaDataFactory (Code) | | Extracts database metadata information (table names and constraints, their
associated columns, etc.)
author: Ahimanikya Satapathy version: $Revision$ |
Method Summary | |
public void | connectDB(Connection conn) Establishes a connection to the database. | public void | disconnectDB() Disconnects from the database. | public String | getDBName() | public String | getDBType() Returns the database Database type. | public static String | getDBTypeFromURL(String url) | public Map<String, ForeignKey> | getForeignKeys(DBTable table) Returns a list of foreign keys for a table. | public PrimaryKeyImpl | getPrimaryKeys(String tcatalog, String tschema, String tname) Returns a list of primary keys for a table. | public String[] | getSchemas() Returns a list of schemas in the database. | public String[][] | getTables(String catalog, String schemaPattern, String tablePattern, String[] tableTypes) Returns a list of tables/views matching in the passed in filters.
Parameters: catalog - Catalog name Parameters: schemaPattern - Schema pattern Parameters: tablePattern - Table/View name pattern Parameters: tableTypes - List of table types to include (ex. | public String[][] | getTablesAndViews(String catalog, String schemaPattern, String tablePattern, boolean includeSystemTables) Returns a list of tables and views matching in the passed in filters. | public String[][] | getTablesOnly(String catalog, String schemaPattern, String tablePattern, boolean includeSystemTables) Returns a list of tables matching in the passed in filters. | public String[][] | getViewsOnly(String catalog, String schemaPattern, String viewPattern, boolean includeSystemTables) Returns a list of views matching in the passed in filters. | public boolean | isTableOrViewExist(String tcatalog, String tschema, String tname) | public void | populateColumns(SQLDBTable table) |
CATALOG | final public static int CATALOG(Code) | | Index to the catalog field for results of table/view/procedure searches
|
DBTYPES | final public static String[] DBTYPES(Code) | | List of database type display descriptions
|
NAME | final public static int NAME(Code) | | Index to the name field for results of table/view/procedure searches
|
PostgreSQL_TEXT | final public static String PostgreSQL_TEXT(Code) | | |
SCHEMA | final public static int SCHEMA(Code) | | Index to the schema field for results of table/view/procedure searches
|
SQLSERVER_TEXT | final public static String SQLSERVER_TEXT(Code) | | |
TYPE | final public static int TYPE(Code) | | Index to the type field for results of table/view/procedure searches
|
VSAM_ADABAS_IAM | final public static String VSAM_ADABAS_IAM(Code) | | |
VSAM_ADABAS_IAM_TEXT | final public static String VSAM_ADABAS_IAM_TEXT(Code) | | |
disconnectDB | public void disconnectDB()(Code) | | Disconnects from the database.
throws: Exception - |
getForeignKeys | public Map<String, ForeignKey> getForeignKeys(DBTable table) throws Exception(Code) | | Returns a list of foreign keys for a table.
Parameters: tcatalog - Catalog name Parameters: tschema - Schema name Parameters: tname - Table name List List of foreign keys throws: Exception - |
getPrimaryKeys | public PrimaryKeyImpl getPrimaryKeys(String tcatalog, String tschema, String tname) throws Exception(Code) | | Returns a list of primary keys for a table.
Parameters: tcatalog - Catalog name Parameters: tschema - Schema name Parameters: tname - Table name List List of primary keys throws: Exception - |
getSchemas | public String[] getSchemas() throws Exception(Code) | | Returns a list of schemas in the database.
String[] List of schema names throws: Exception - |
getTables | public String[][] getTables(String catalog, String schemaPattern, String tablePattern, String[] tableTypes) throws Exception(Code) | | Returns a list of tables/views matching in the passed in filters.
Parameters: catalog - Catalog name Parameters: schemaPattern - Schema pattern Parameters: tablePattern - Table/View name pattern Parameters: tableTypes - List of table types to include (ex. TABLE, VIEW) String[][] List of tables matching search filters throws: Exception - |
getTablesAndViews | public String[][] getTablesAndViews(String catalog, String schemaPattern, String tablePattern, boolean includeSystemTables) throws Exception(Code) | | Returns a list of tables and views matching in the passed in filters.
Parameters: catalog - Catalog name Parameters: schemaPattern - Schema pattern Parameters: tablePattern - Table/View name pattern Parameters: includeSystemTables - Indicate whether to include system tables in search String[][] List of tables and views matching search filters throws: Exception - |
getTablesOnly | public String[][] getTablesOnly(String catalog, String schemaPattern, String tablePattern, boolean includeSystemTables) throws Exception(Code) | | Returns a list of tables matching in the passed in filters.
Parameters: catalog - Catalog name Parameters: schemaPattern - Schema pattern Parameters: tablePattern - Table name pattern Parameters: includeSystemTables - Indicate whether to include system tables in search String[][] List of tables matching search filters throws: Exception - |
getViewsOnly | public String[][] getViewsOnly(String catalog, String schemaPattern, String viewPattern, boolean includeSystemTables) throws Exception(Code) | | Returns a list of views matching in the passed in filters.
Parameters: catalog - Catalog name Parameters: schemaPattern - Schema pattern Parameters: viewPattern - View name pattern Parameters: includeSystemTables - Indicate whether to include system tables in search String[][] List of views matching search filters throws: Exception - |
|
|