ny
23 小时以前 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
package jnpf.base.service;
 
import jnpf.base.Page;
import jnpf.base.Pagination;
import jnpf.database.model.dbfield.DbFieldModel;
import jnpf.database.model.dbtable.DbTableFieldModel;
import jnpf.database.model.page.DbTableDataForm;
import jnpf.exception.DataException;
 
import java.util.List;
import java.util.Map;
 
/**
 * 数据管理
 *
 * @author JNPF开发平台组
 * @version V3.1.0
 * @copyright 引迈信息技术有限公司
 * @date 2019年9月27日 上午9:18
 */
public interface DbTableService {
 
    /**
     * 1:表列表
     *
     * @param dbLinkId 连接Id
     * @param methodName
     * @return 表集合信息
     * @throws DataException ignore
     */
    List<DbTableFieldModel> getList(String dbLinkId, String methodName) throws Exception;
 
    /**
     * 1:表列表
     *
     * @param dbLinkId 连接Id
     * @param page 关键字
     * @return 表集合信息
     * @throws DataException ignore
     */
    List<DbTableFieldModel> getListPage(String dbLinkId, Page page) throws Exception;
 
    /**
     * 1:表列表
     *
     * @param dbLinkId 连接Id
     * @return 表集合信息
     * @throws DataException ignore
     */
    List<DbTableFieldModel> getListPage(String dbLinkId, Pagination pagination) throws Exception;
 
 
    /**
     * 2:单表信息
     *
     * @param dbLinkId 连接Id
     * @return 表集合信息
     * @throws DataException ignore
     */
    DbTableFieldModel getTable(String dbLinkId, String table) throws Exception;
 
    /**
     * 3:表字段
     *
     * @param dbLinkId 连接Id
     * @param table 表名
     * @return 字段集合信息
     * @throws DataException ignore
     */
    List<DbFieldModel> getFieldList(String dbLinkId, String table) throws Exception;
 
    /**
     * 4:表数据
     *
     * @param dbTableDataForm 分页
     * @param dbLinkId 连接Id
     * @param table 表名
     * @return 表数据集合
     * @throws Exception ignore
     */
    List<Map<String, Object>> getData(DbTableDataForm dbTableDataForm, String dbLinkId, String table) throws Exception;
 
    /**
     * 5:校验:表名重名
     *
     * @param dbLinkId 连接Id
     * @return 重名标识
     * @throws Exception ignore
     */
    boolean isExistTable(String dbLinkId, String table) throws Exception;
 
    /**
     * 6:删除存在表
     *
     * @param dbLinkId 连接ID
     * @param table 删除表
     */
    boolean dropExistsTable(String dbLinkId, String table) throws Exception;
 
    /**
     * 7:删除表
     *
     * @param dbLinkId  连接Id
     * @param table 表名
     * @throws DataException ignore
     */
    void delete(String dbLinkId, String table) throws Exception;
 
    /**
     * 删除全部表(慎用)
     * @param dbLinkId 连接Id
     */
    void deleteAllTable(String dbLinkId, String dbType) throws Exception;
 
    /**
     * 8:创建表
     *
     * @param dbTableFieldModel 前端创表表单信息
     * @return 执行状态(1:成功;0:重名)
     * @throws DataException ignore
     */
    int createTable(DbTableFieldModel dbTableFieldModel) throws Exception;
 
    /**
     * 9:获取表模型
     * @param dbLinkId 数据连接ID
     * @param tableName 表名
     * @return 表模板
     * @throws Exception ignore
     */
    DbTableFieldModel getDbTableModel(String dbLinkId, String tableName) throws Exception;
 
    /**
     * 10:修改表
     *
     * @param dbTableFieldModel 修改表参数对象
     * @throws DataException ignore
     */
    void update(DbTableFieldModel dbTableFieldModel) throws Exception;
 
    /**
     * 11:添加字段
     * @param dbTableFieldModel 数据表字段模型
     * @throws DataException ignore
     */
    void addField(DbTableFieldModel dbTableFieldModel) throws Exception;
 
    /**
     * 12:获取表数据行数
     *
     * @param dbLinkId  数据连接Id
     * @param table 表名
     * @return 数据行数
     * @throws DataException ignore
     */
    int getSum(String dbLinkId, String table) throws Exception;
 
    /**
     * 13:获取动态数据源
     *
     * @param dbLinkId 数据连接ID
     * @return 动态数据库源
     * @throws DataException ignore
     */
//    DbConnDTO getResource(String dbLinkId) throws DataException;
 
}