com.agimatec.sql.meta.checking
Class JdbcSqlMetaFactory
java.lang.Object
com.agimatec.sql.meta.checking.JdbcSqlMetaFactory
- All Implemented Interfaces:
- SqlMetaFactory
- Direct Known Subclasses:
- PostgresJdbcSqlMetaFactory
public class JdbcSqlMetaFactory
- extends Object
- implements SqlMetaFactory
Description: Read database catalog with JDBC DatabaseMetaData APIs
User: roman.stumm
Date: 10.03.2008
Time: 10:42:36
Copyright: Agimatec GmbH
|
Method Summary |
protected void |
addTables(String[] tables,
CatalogDescription aCatalog)
|
CatalogDescription |
buildCatalog(String[] tables)
create a CatalogDescription |
protected TableDescription |
createTable(String tableName)
|
protected JdbcSqlMetaFactory.TableIdentifier |
createTableIdentifier(String table)
|
void |
equalizeColumn(ColumnDescription cd)
|
JdbcDatabase |
getDatabase()
|
boolean |
isColumns()
|
boolean |
isForeignKeys()
|
boolean |
isIndices()
|
boolean |
isPrimaryKeys()
|
protected void |
loadColumns(DatabaseMetaData meta,
Map<String,DataType> types,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected void |
loadForeignKeys(DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected void |
loadIndices(DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected void |
loadPrimaryKey(DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected Map<String,DataType> |
loadTypes(DatabaseMetaData meta)
|
void |
setColumns(boolean columns)
|
void |
setForeignKeys(boolean foreignKeys)
|
void |
setIndices(boolean indices)
|
void |
setPrimaryKeys(boolean primaryKeys)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcSqlMetaFactory
public JdbcSqlMetaFactory(JdbcDatabase database)
getDatabase
public JdbcDatabase getDatabase()
isColumns
public boolean isColumns()
setColumns
public void setColumns(boolean columns)
isForeignKeys
public boolean isForeignKeys()
setForeignKeys
public void setForeignKeys(boolean foreignKeys)
isIndices
public boolean isIndices()
setIndices
public void setIndices(boolean indices)
isPrimaryKeys
public boolean isPrimaryKeys()
setPrimaryKeys
public void setPrimaryKeys(boolean primaryKeys)
equalizeColumn
public void equalizeColumn(ColumnDescription cd)
buildCatalog
public CatalogDescription buildCatalog(String[] tables)
throws SQLException,
IOException
- create a CatalogDescription
- Throws:
SQLException
IOException
addTables
protected void addTables(String[] tables,
CatalogDescription aCatalog)
throws SQLException,
IOException
- Throws:
SQLException
IOException
createTableIdentifier
protected JdbcSqlMetaFactory.TableIdentifier createTableIdentifier(String table)
loadIndices
protected void loadIndices(DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws SQLException
- Throws:
SQLException
loadForeignKeys
protected void loadForeignKeys(DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws SQLException
- Throws:
SQLException
loadTypes
protected Map<String,DataType> loadTypes(DatabaseMetaData meta)
throws SQLException
- Throws:
SQLException
loadColumns
protected void loadColumns(DatabaseMetaData meta,
Map<String,DataType> types,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws SQLException
- Throws:
SQLException
loadPrimaryKey
protected void loadPrimaryKey(DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws SQLException
- Throws:
SQLException
createTable
protected TableDescription createTable(String tableName)
throws SQLException
- Throws:
SQLException
Copyright © 2008-2011. All Rights Reserved.