TableInfo.java
2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
package com.huaheng.pc.tool.gen.domain;
import java.util.List;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.web.domain.BaseEntity;
/**
* ry 数据库表
*
* @author huaheng
*/
public class TableInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 表名称 */
private String tableName;
/** 表描述 */
private String tableComment;
/** 表的主键列信息 */
private ColumnInfo primaryKey;
/** 表的列名(不包含主键) */
private List<ColumnInfo> columns;
/** 类名(第一个字母大写) */
private String className;
/** 类名(第一个字母小写) */
private String classname;
public String getTableName()
{
return tableName;
}
public void setTableName(String tableName)
{
this.tableName = tableName;
}
public String getTableComment()
{
return tableComment;
}
public void setTableComment(String tableComment)
{
this.tableComment = tableComment;
}
public List<ColumnInfo> getColumns()
{
return columns;
}
public ColumnInfo getColumnsLast()
{
ColumnInfo columnInfo = null;
if (StringUtils.isNotNull(columns) && columns.size() > 0)
{
columnInfo = columns.get(0);
}
return columnInfo;
}
public void setColumns(List<ColumnInfo> columns)
{
this.columns = columns;
}
public String getClassName()
{
return className;
}
public void setClassName(String className)
{
this.className = className;
}
public String getClassname()
{
return classname;
}
public void setClassname(String classname)
{
this.classname = classname;
}
public ColumnInfo getPrimaryKey()
{
return primaryKey;
}
public void setPrimaryKey(ColumnInfo primaryKey)
{
this.primaryKey = primaryKey;
}
@Override
public String toString()
{
return "TableInfo [tableName=" + tableName + ", tableComment=" + tableComment + ", primaryKey=" + primaryKey
+ ", columns=" + columns + ", className=" + className + ", classname=" + classname + "]";
}
}