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 java.lang.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(java.lang.String[] tables,
CatalogDescription aCatalog)
|
CatalogDescription |
buildCatalog(java.lang.String[] tables)
create a CatalogDescription |
protected TableDescription |
createTable(java.lang.String tableName)
|
protected JdbcSqlMetaFactory.TableIdentifier |
createTableIdentifier(java.lang.String table)
|
void |
equalizeColumn(ColumnDescription cd)
|
JdbcDatabase |
getDatabase()
|
boolean |
isColumns()
|
boolean |
isForeignKeys()
|
boolean |
isIndices()
|
boolean |
isPrimaryKeys()
|
protected void |
loadColumns(java.sql.DatabaseMetaData meta,
java.util.Map<java.lang.String,DataType> types,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected void |
loadForeignKeys(java.sql.DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected void |
loadIndexes(java.sql.DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected void |
loadPrimaryKey(java.sql.DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
|
protected java.util.Map<java.lang.String,DataType> |
loadTypes(java.sql.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(java.lang.String[] tables)
throws java.sql.SQLException,
java.io.IOException
- create a CatalogDescription
- Throws:
java.sql.SQLException
java.io.IOException
addTables
protected void addTables(java.lang.String[] tables,
CatalogDescription aCatalog)
throws java.sql.SQLException,
java.io.IOException
- Throws:
java.sql.SQLException
java.io.IOException
createTableIdentifier
protected JdbcSqlMetaFactory.TableIdentifier createTableIdentifier(java.lang.String table)
loadIndexes
protected void loadIndexes(java.sql.DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
loadForeignKeys
protected void loadForeignKeys(java.sql.DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
loadTypes
protected java.util.Map<java.lang.String,DataType> loadTypes(java.sql.DatabaseMetaData meta)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
loadColumns
protected void loadColumns(java.sql.DatabaseMetaData meta,
java.util.Map<java.lang.String,DataType> types,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
loadPrimaryKey
protected void loadPrimaryKey(java.sql.DatabaseMetaData meta,
JdbcSqlMetaFactory.TableIdentifier tid,
TableDescription td)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createTable
protected TableDescription createTable(java.lang.String tableName)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Copyright © 2008-2012. All Rights Reserved.