public class Table extends Object implements Serializable, Cloneable
Modifier and Type | Method and Description |
---|---|
Table |
addPk(String pkColumnName)
添加主键
|
Table |
clone() |
static Table |
create(String tableName) |
String |
getCatalog()
获取catalog
|
Column |
getColumn(String name)
获取某列信息
|
Collection<Column> |
getColumns()
获取所有字段元信息
|
String |
getComment()
获取注释
|
List<IndexInfo> |
getIndexInfoList()
获取索引信息
|
Set<String> |
getPkNames()
获取主键列表
|
String |
getSchema()
获取 schema
|
String |
getTableName()
获取表名
|
boolean |
isPk(String columnName)
给定列名是否为主键
|
Table |
setCatalog(String catalog)
设置catalog
|
Table |
setColumn(Column column)
设置列对象
|
Table |
setComment(String comment)
设置注释
|
void |
setIndexInfoList(List<IndexInfo> indexInfoList)
设置索引信息
|
void |
setPkNames(Set<String> pkNames)
设置主键列表
|
Table |
setSchema(String schema)
设置schema
|
void |
setTableName(String tableName)
设置表名
|
public Table(String tableName)
tableName
- 表名public String getSchema()
public Table setSchema(String schema)
schema
- schemapublic String getCatalog()
public Table setCatalog(String catalog)
catalog
- catalogpublic String getTableName()
public void setTableName(String tableName)
tableName
- 表名public String getComment()
public boolean isPk(String columnName)
columnName
- 列名public Column getColumn(String name)
name
- 列名public Collection<Column> getColumns()
public void setIndexInfoList(List<IndexInfo> indexInfoList)
indexInfoList
- 索引信息列表public Table clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2024. All rights reserved.