org.hibernate.cfg.reveng.dialect
Class MySQLMetaDataDialect

java.lang.Object
  extended by org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect
      extended by org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect
          extended by org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect
All Implemented Interfaces:
MetaDataDialect

public class MySQLMetaDataDialect
extends JDBCMetaDataDialect


Field Summary
 
Fields inherited from class org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect
log
 
Constructor Summary
MySQLMetaDataDialect()
           
 
Method Summary
 Iterator getSuggestedPrimaryKeyStrategyName(String catalog, String schema, String table)
          Based on info from http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html Should work on pre-mysql 5 too since it uses the "old" SHOW TABLE command instead of SELECT from infotable.
 
Methods inherited from class org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect
getColumns, getExportedKeys, getIndexInfo, getPrimaryKeys, getTables, putExportedKeysPart, putTablePart
 
Methods inherited from class org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect
caseForSearch, close, close, configure, getConnection, getDatabaseStructure, getMetaData, getReverseEngineeringRuntimeInfo, getSQLExceptionConverter, needQuote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLMetaDataDialect

public MySQLMetaDataDialect()
Method Detail

getSuggestedPrimaryKeyStrategyName

public Iterator getSuggestedPrimaryKeyStrategyName(String catalog,
                                                   String schema,
                                                   String table)
Based on info from http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html Should work on pre-mysql 5 too since it uses the "old" SHOW TABLE command instead of SELECT from infotable.

Specified by:
getSuggestedPrimaryKeyStrategyName in interface MetaDataDialect
Overrides:
getSuggestedPrimaryKeyStrategyName in class AbstractMetaDataDialect
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "HIBERNATE_STRATEGY" (null if no possible to determine strategy, otherwise return hibernate identifier strategy name/classname)