commit
00c6b4d330
@ -0,0 +1,15 @@
|
|||||||
|
package core.operation;
|
||||||
|
|
||||||
|
import core.user.User;
|
||||||
|
import dao.DBManagement;
|
||||||
|
import error.GExcptSQL;
|
||||||
|
|
||||||
|
public class Delete extends Operation {
|
||||||
|
@Override
|
||||||
|
public void execute(User subject) throws GExcptSQL {
|
||||||
|
String id = (String)options.get("id");
|
||||||
|
String sql = "DELETE FROM graduation_design WHERE id = \'"+
|
||||||
|
id+"\'";
|
||||||
|
DBManagement.update(sql);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"id": "java.lang.String"
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package core.operation;
|
||||||
|
|
||||||
|
public class DownloadFile {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package core.operation;
|
||||||
|
|
||||||
|
public class FillInformation {
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package core.operation;
|
||||||
|
|
||||||
|
import core.user.User;
|
||||||
|
import dao.DBManagement;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
|
||||||
|
public class Search extends Operation {
|
||||||
|
@Override
|
||||||
|
public void execute(User subject) throws Exception {
|
||||||
|
String table = (String)options.get("table");
|
||||||
|
String field = (String)options.get("field");
|
||||||
|
String value = (String)options.get("value");
|
||||||
|
int start = (int)options.get("start");
|
||||||
|
int end = (int)options.get("end");
|
||||||
|
String sql = "SELECT * FROM "+table+
|
||||||
|
" WHERE "+field+" = \'"+value+"\'"+
|
||||||
|
" limit "+start+", "+end;
|
||||||
|
ResultSet rs = DBManagement.query(sql);
|
||||||
|
//todo
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"table": "java.lang.String",
|
||||||
|
"field": "java.lang.String",
|
||||||
|
"value": "java.lang.String",
|
||||||
|
"start": "int",
|
||||||
|
"end": "int",
|
||||||
|
"return": "java.lang.String[][]"
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"student_id": "java.lang.String",
|
||||||
|
"teacher_id": "java.lang.String"
|
||||||
|
}
|
Loading…
Reference in new issue