Package org.hibernate.tool.api.reveng
Interface RevengDialect
- All Known Implementing Classes:
AbstractMetaDataDialect,CachedMetaDataDialect,H2MetaDataDialect,HSQLMetaDataDialect,JDBCMetaDataDialect,MySQLMetaDataDialect,OracleMetaDataDialect,SQLServerMetaDataDialect
public interface RevengDialect
Interface for fetching metadata from databases.
The dialect is configured with a ConnectionProvider but is not
required to actually use any connections.
The metadata methods all returns Iterator and allows for more efficient and partial reads
for those databases that has "flakey" JDBC metadata implementions.
- Author:
- Max Rydahl Andersen
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close any resources this dialect might have used.voidClose the iterator.voidconfigure(org.hibernate.engine.jdbc.connections.spi.ConnectionProvider connectionProvider) Configure the metadatadialect.getColumns(String catalog, String schema, String table, String column) Return iterator over the columns that mathces catalog, schema and tablegetExportedKeys(String catalog, String schema, String table) Return iterator over the exported foreign keys that mathces catalog, schema and tablegetIndexInfo(String catalog, String schema, String table) Return iterator over the indexes that mathces catalog, schema and tablegetPrimaryKeys(String catalog, String schema, String name) Return iterator over the columns that mathces catalog, schema and tablegetSuggestedPrimaryKeyStrategyName(String catalog, String schema, String table) Use database (possible native) metadata to suggest identifier strategy.Return iterator over the tables that mathces catalog, schema and tablebooleanDoes this name need quoting
-
Method Details
-
configure
void configure(org.hibernate.engine.jdbc.connections.spi.ConnectionProvider connectionProvider) Configure the metadatadialect.- Parameters:
connectionProvider- aConnectionProvider
-
getTables
Return iterator over the tables that mathces catalog, schema and table- Parameters:
catalog- name or nullschema- name or nulltable- name or null- Returns:
- iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "TABLE_TYPE" keys.
-
close
Close the iterator.- Parameters:
iterator- an iterator returned from one of methods on this dialect
-
getIndexInfo
Return iterator over the indexes that mathces catalog, schema and table- Parameters:
catalog- name or nullschema- name or nulltable- name or null- Returns:
- iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "INDEX_NAME", "COLUMN_NAME", "NON_UNIQUE", "TYPE" keys.
-
getColumns
Return iterator over the columns that mathces catalog, schema and table- Parameters:
catalog- name or nullschema- name or nulltable- name or nullcolumn- 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
Return iterator over the columns that mathces catalog, schema and table- Parameters:
catalog- name or nullschema- name or nulltable- name or null- Returns:
- iterator with map elements that has "TABLE_NAME", "TABLE_SCHEMA", "TABLE_CAT", "COLUMN_NAME", "KEY_SEQ", "PK_NAME",
-
getExportedKeys
Return iterator over the exported foreign keys that mathces catalog, schema and table- Parameters:
catalog- name or nullschema- name or nulltable- 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"
-
needQuote
Does this name need quoting- Parameters:
name-- Returns:
-
close
void close()Close any resources this dialect might have used. -
getSuggestedPrimaryKeyStrategyName
Iterator<Map<String,Object>> getSuggestedPrimaryKeyStrategyName(String catalog, String schema, String table) Use database (possible native) metadata to suggest identifier strategy.- Parameters:
catalog-schema-name-- 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)
-