📄 removecommand.java
字号:
package controller.command;
import java.sql.SQLException;
import model.condition.visitor.SingleVisitor;
import model.condition.visitor.Visitor;
/**
*
* <p>Title: </p>
* 删除命令
* <p>Description: </p>
* 通过此类调用model层的删除命令
*/
public class RemoveCommand implements OperateCommand{
String id;
public RemoveCommand(String id){
this.id = id;
}
public void excute() {
Visitor v = new SingleVisitor();
try{
v.remove(this.id);
}catch(SQLException e){System.out.println("sql wrong");}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -