org.hibernate.cfg.reveng.dialect
Class JDBCMetaDataDialect

java.lang.Object
  extended by org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect
      extended by org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect
All Implemented Interfaces:
MetaDataDialect
Direct Known Subclasses:
H2MetaDataDialect, MySQLMetaDataDialect

public class JDBCMetaDataDialect
extends AbstractMetaDataDialect

MetaData dialect that uses standard JDBC for reading metadata.

Author:
Max Rydahl Andersen

Field Summary
 
Fields inherited from class org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect
log
 
Constructor Summary
JDBCMetaDataDialect()
           
 
Method Summary
 Iterator getColumns(String xcatalog, String xschema, String xtable, String xcolumn)
          Return iterator over the columns that mathces catalog, schema and table
 Iterator getExportedKeys(String xcatalog, String xschema, String xtable)
          Return iterator over the exported foreign keys that mathces catalog, schema and table
 Iterator getIndexInfo(String xcatalog, String xschema, String xtable)
          Return iterator over the indexes that mathces catalog, schema and table
 Iterator getPrimaryKeys(String xcatalog, String xschema, String xtable)
          Return iterator over the columns that mathces catalog, schema and table
 Iterator getTables(String xcatalog, String xschema, String xtable)
          Return iterator over the tables that mathces catalog, schema and table
protected  void putExportedKeysPart(Map element, ResultSet rs)
           
protected  void putTablePart(Map element, ResultSet tableRs)
           
 
Methods inherited from class org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect
caseForSearch, close, close, configure, getConnection, getDatabaseStructure, getMetaData, getReverseEngineeringRuntimeInfo, getSQLExceptionConverter, getSuggestedPrimaryKeyStrategyName, needQuote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCMetaDataDialect

public JDBCMetaDataDialect()
Method Detail

getTables

public Iterator getTables(String xcatalog,
                          String xschema,
                          String xtable)
Description copied from interface: MetaDataDialect
Return iterator over the tables that mathces catalog, schema and table

Parameters:
xcatalog - name or null
xschema - name or null
xtable - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "TABLE_TYPE" keys.

getIndexInfo

public Iterator getIndexInfo(String xcatalog,
                             String xschema,
                             String xtable)
Description copied from interface: MetaDataDialect
Return iterator over the indexes that mathces catalog, schema and table

Parameters:
xcatalog - name or null
xschema - name or null
xtable - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "INDEX_NAME", "COLUMN_NAME", "NON_UNIQUE", "TYPE" keys.

putTablePart

protected void putTablePart(Map element,
                            ResultSet tableRs)
                     throws SQLException
Throws:
SQLException

getColumns

public Iterator getColumns(String xcatalog,
                           String xschema,
                           String xtable,
                           String xcolumn)
Description copied from interface: MetaDataDialect
Return iterator over the columns that mathces catalog, schema and table

Parameters:
xcatalog - name or null
xschema - name or null
xtable - name or null
xcolumn - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "DATA_TYPE", "TYPE_NAME", "COLUMN_NAME", "NULLABLE", "COLUMN_SIZE", "DECIMAL_DIGITS"

getPrimaryKeys

public Iterator getPrimaryKeys(String xcatalog,
                               String xschema,
                               String xtable)
Description copied from interface: MetaDataDialect
Return iterator over the columns that mathces catalog, schema and table

Parameters:
xcatalog - name or null
xschema - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "COLUMN_NAME", "KEY_SEQ", "PK_NAME",

getExportedKeys

public Iterator getExportedKeys(String xcatalog,
                                String xschema,
                                String xtable)
Description copied from interface: MetaDataDialect
Return iterator over the exported foreign keys that mathces catalog, schema and table

Parameters:
xcatalog - name or null
xschema - name or null
xtable - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "FKTABLE_CAT", "FKTABLE_SCHEM", "FKTABLE_NAME", "FK_NAME", "KEY_SEQ"

putExportedKeysPart

protected void putExportedKeysPart(Map element,
                                   ResultSet rs)
                            throws SQLException
Throws:
SQLException