org.hibernate.cfg.reveng.dialect
Class CachedMetaDataDialect

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

public class CachedMetaDataDialect
extends Object
implements MetaDataDialect


Constructor Summary
CachedMetaDataDialect(MetaDataDialect realMetaData)
           
 
Method Summary
 void close()
          Close any resources this dialect might have used.
 void close(Iterator iterator)
          Close the iterator.
 void configure(ReverseEngineeringRuntimeInfo info)
          Configure the metadatadialect.
 Iterator getColumns(String catalog, String schema, String table, String column)
          Return iterator over the columns that mathces catalog, schema and table
 Iterator getExportedKeys(String catalog, String schema, String table)
          Return iterator over the exported foreign keys that mathces catalog, schema and table
 Iterator getIndexInfo(String catalog, String schema, String table)
          Return iterator over the indexes that mathces catalog, schema and table
 Iterator getPrimaryKeys(String catalog, String schema, String name)
          Return iterator over the columns that mathces catalog, schema and table
 Iterator getSuggestedPrimaryKeyStrategyName(String catalog, String schema, String table)
          Use database (possible native) metadata to suggest identifier strategy.
 Iterator getTables(String catalog, String schema, String table)
          Return iterator over the tables that mathces catalog, schema and table
 boolean needQuote(String name)
          Does this name need quoting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedMetaDataDialect

public CachedMetaDataDialect(MetaDataDialect realMetaData)
Method Detail

close

public void close()
Description copied from interface: MetaDataDialect
Close any resources this dialect might have used.

Specified by:
close in interface MetaDataDialect

configure

public void configure(ReverseEngineeringRuntimeInfo info)
Description copied from interface: MetaDataDialect
Configure the metadatadialect.

Specified by:
configure in interface MetaDataDialect
Parameters:
info - a ReverseEngineeringRuntimeInfo to extract Connection and SQLExceptionConverter and other runtime info

close

public void close(Iterator iterator)
Description copied from interface: MetaDataDialect
Close the iterator.

Specified by:
close in interface MetaDataDialect
Parameters:
iterator - an iterator returned from one of methods on this dialect

getColumns

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

Specified by:
getColumns in interface MetaDataDialect
Parameters:
catalog - name or null
schema - name or null
table - name or null
column - 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"

getExportedKeys

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

Specified by:
getExportedKeys in interface MetaDataDialect
Parameters:
catalog - name or null
schema - name or null
table - 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"

getIndexInfo

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

Specified by:
getIndexInfo in interface MetaDataDialect
Parameters:
catalog - name or null
schema - name or null
table - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "INDEX_NAME", "COLUMN_NAME", "NON_UNIQUE", "TYPE" keys.

getPrimaryKeys

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

Specified by:
getPrimaryKeys in interface MetaDataDialect
Parameters:
catalog - name or null
schema - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "COLUMN_NAME", "KEY_SEQ", "PK_NAME",

getTables

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

Specified by:
getTables in interface MetaDataDialect
Parameters:
catalog - name or null
schema - name or null
table - name or null
Returns:
iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "TABLE_TYPE" keys.

getSuggestedPrimaryKeyStrategyName

public Iterator getSuggestedPrimaryKeyStrategyName(String catalog,
                                                   String schema,
                                                   String table)
Description copied from interface: MetaDataDialect
Use database (possible native) metadata to suggest identifier strategy.

Specified by:
getSuggestedPrimaryKeyStrategyName in interface MetaDataDialect
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)

needQuote

public boolean needQuote(String name)
Description copied from interface: MetaDataDialect
Does this name need quoting

Specified by:
needQuote in interface MetaDataDialect
Returns: