forked from APIJSON/APIJSON-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDemoParser.java
More file actions
35 lines (26 loc) · 944 Bytes
/
DemoParser.java
File metadata and controls
35 lines (26 loc) · 944 Bytes
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
package apijson.demo;
import com.alibaba.fastjson.JSONObject;
import apijson.RequestMethod;
import apijson.framework.APIJSONObjectParser;
import apijson.framework.APIJSONParser;
import apijson.orm.SQLConfig;
public class DemoParser extends APIJSONParser<String> {
public DemoParser() {
super();
}
public DemoParser(RequestMethod method) {
super(method);
}
public DemoParser(RequestMethod method, boolean needVerify) {
super(method, needVerify);
}
// 可重写来设置最大查询数量
// @Override
// public int getMaxQueryCount() {
// return 50;
// }
@Override
public APIJSONObjectParser createObjectParser(JSONObject request, String parentPath, SQLConfig arrayConfig, boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception {
return new DemoObjectParser(getSession(), request, parentPath, arrayConfig, isSubquery, isTable, isArrayMainTable).setMethod(getMethod()).setParser(this);
}
}