Skip to content

Commit 886099f

Browse files
committed
SQLConfig 内把所有 AbstractSQLConfig 改成 SQLConfig;优化 Verifier 的注释
1 parent c085ab5 commit 886099f

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

APIJSONORM/src/main/java/apijson/orm/SQLConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ public interface SQLConfig<T extends Object> {
5050

5151
Parser<T> getParser();
5252

53-
AbstractSQLConfig setParser(Parser<T> parser);
53+
SQLConfig setParser(Parser<T> parser);
5454

5555
ObjectParser getObjectParser();
5656

57-
AbstractSQLConfig setObjectParser(ObjectParser objectParser);
57+
SQLConfig setObjectParser(ObjectParser objectParser);
5858

5959
int getVersion();
6060

61-
AbstractSQLConfig setVersion(int version);
61+
SQLConfig setVersion(int version);
6262

6363
String getTag();
6464

65-
AbstractSQLConfig setTag(String tag);
65+
SQLConfig setTag(String tag);
6666

6767
boolean isMySQL();
6868
boolean isPostgreSQL();
@@ -243,7 +243,7 @@ default int[] getDBVersionNums() {
243243
String getTablePath();
244244

245245
Map<String, String> getKeyMap();
246-
AbstractSQLConfig setKeyMap(Map<String, String> keyMap);
246+
SQLConfig setKeyMap(Map<String, String> keyMap);
247247

248248
List<String> getRaw();
249249
SQLConfig setRaw(List<String> raw);

APIJSONORM/src/main/java/apijson/orm/Verifier.java

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public interface Verifier<T> {
1818

1919
/**验证权限是否通过
2020
* @param config
21-
* @param visitor
2221
* @return
2322
* @throws Exception
2423
*/
@@ -37,12 +36,10 @@ public interface Verifier<T> {
3736
void verifyRole(SQLConfig config, String table, RequestMethod method, String role) throws Exception;
3837

3938
/**登录校验
40-
* @param config
4139
* @throws Exception
4240
*/
4341
void verifyLogin() throws Exception;
4442
/**管理员角色校验
45-
* @param config
4643
* @throws Exception
4744
*/
4845
void verifyAdmin() throws Exception;
@@ -67,24 +64,36 @@ public interface Verifier<T> {
6764
void verifyRepeat(String table, String key, Object value, long exceptId) throws Exception;
6865

6966
/**验证请求参数的数据和结构
70-
* @param table
71-
* @param key
72-
* @param value
73-
* @param exceptId 不包含id
67+
* @param method
68+
* @param name
69+
* @param target
70+
* @param request
71+
* @param maxUpdateCount
72+
* @param globalDatabase
73+
* @param globalSchema
74+
* @param creator
75+
* @return
7476
* @throws Exception
7577
*/
7678
JSONObject verifyRequest(RequestMethod method, String name, JSONObject target, JSONObject request,
7779
int maxUpdateCount, String globalDatabase, String globalSchema, SQLCreator creator) throws Exception;
7880

7981
/**验证返回结果的数据和结构
80-
* @param table
81-
* @param key
82-
* @param value
83-
* @param exceptId 不包含id
82+
* @param method
83+
* @param name
84+
* @param target
85+
* @param response
86+
* @param database
87+
* @param schema
88+
* @param creator
89+
* @param callback
90+
* @return
8491
* @throws Exception
8592
*/
86-
JSONObject verifyResponse(RequestMethod method, String name, JSONObject target, JSONObject response,
87-
String database, String schema, SQLCreator creator, OnParseCallback callback) throws Exception;
93+
JSONObject verifyResponse(
94+
RequestMethod method, String name, JSONObject target, JSONObject response,
95+
String database, String schema, SQLCreator creator, OnParseCallback callback
96+
) throws Exception;
8897

8998

9099
@NotNull

0 commit comments

Comments
 (0)