public class MetaBuilder extends Object
MetaBuilder class.
| 限定符和类型 | 字段和说明 |
|---|---|
protected Connection |
conn |
protected DataSource |
dataSource |
protected DatabaseMetaData |
dbMeta |
protected Dialect |
dialect |
protected Set<String> |
excludedTables |
protected boolean |
generateRemarks |
protected String[] |
removedTableNamePrefixes |
protected TypeMapping |
typeMapping |
| 构造器和说明 |
|---|
MetaBuilder(DataSource dataSource)
Constructor for MetaBuilder.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addExcludedTable(String... excludedTables)
addExcludedTable.
|
List<TableMeta> |
build()
build.
|
protected String |
buildAttrName(String colName)
buildAttrName.
|
protected String |
buildBaseModelName(String modelName)
buildBaseModelName.
|
protected void |
buildColumnMetas(TableMeta tableMeta)
buildColumnMetas.
|
protected String |
buildModelName(String tableName)
buildModelName.
|
protected void |
buildPrimaryKey(TableMeta tableMeta)
buildPrimaryKey.
|
protected void |
buildTableNames(List<TableMeta> ret)
buildTableNames.
|
protected ResultSet |
getTablesResultSet()
getTablesResultSet.
|
protected String |
handleJavaType(String typeStr,
ResultSetMetaData rsmd,
int column)
handleJavaType.
|
protected boolean |
isSkipTable(String tableName)
isSkipTable.
|
protected void |
removeNoPrimaryKeyTable(List<TableMeta> ret)
removeNoPrimaryKeyTable.
|
void |
setDialect(Dialect dialect)
Setter for the field
dialect. |
void |
setGenerateRemarks(boolean generateRemarks)
Setter for the field
generateRemarks. |
void |
setRemovedTableNamePrefixes(String... removedTableNamePrefixes)
Setter for the field
removedTableNamePrefixes. |
void |
setTypeMapping(TypeMapping typeMapping)
Setter for the field
typeMapping. |
protected DataSource dataSource
protected Dialect dialect
protected Connection conn
protected DatabaseMetaData dbMeta
protected String[] removedTableNamePrefixes
protected TypeMapping typeMapping
protected boolean generateRemarks
public MetaBuilder(DataSource dataSource)
Constructor for MetaBuilder.
dataSource - a DataSource object.public void setGenerateRemarks(boolean generateRemarks)
Setter for the field generateRemarks.
generateRemarks - a boolean.public void setDialect(Dialect dialect)
Setter for the field dialect.
dialect - a Dialect object.public void addExcludedTable(String... excludedTables)
addExcludedTable.
excludedTables - a String object.public void setRemovedTableNamePrefixes(String... removedTableNamePrefixes)
Setter for the field removedTableNamePrefixes.
removedTableNamePrefixes - a String object.public void setTypeMapping(TypeMapping typeMapping)
Setter for the field typeMapping.
typeMapping - a TypeMapping object.protected void removeNoPrimaryKeyTable(List<TableMeta> ret)
removeNoPrimaryKeyTable.
ret - a List object.protected boolean isSkipTable(String tableName)
isSkipTable.
tableName - a String object.protected ResultSet getTablesResultSet() throws SQLException
getTablesResultSet.
ResultSet object.SQLException - if any.protected void buildTableNames(List<TableMeta> ret) throws SQLException
buildTableNames.
ret - a List object.SQLException - if any.protected void buildPrimaryKey(TableMeta tableMeta) throws SQLException
buildPrimaryKey.
tableMeta - a TableMeta object.SQLException - if any.protected void buildColumnMetas(TableMeta tableMeta) throws SQLException
buildColumnMetas.
tableMeta - a TableMeta object.SQLException - if any.protected String handleJavaType(String typeStr, ResultSetMetaData rsmd, int column) throws SQLException
handleJavaType.
typeStr - a String object.rsmd - a ResultSetMetaData object.column - a int.String object.SQLException - if any.Copyright © 2023. All rights reserved.