⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updatecommand.java

📁 利用JAVA开发的简单考试系统
💻 JAVA
字号:
package controller.command;

import java.sql.SQLException;
import model.condition.visitor.SingleVisitor;
import model.condition.visitor.Visitor;
import model.persistency.PersistentItem;
/**
 *
 * <p>Title: </p>
 * 更新命令
 * <p>Description: </p>
 * 继承操作命令接口,通过此类调用MODEL层的更新命令
 */
public class UpdateCommand implements OperateCommand{
	PersistentItem item;
	public UpdateCommand(PersistentItem itm){
		item = new PersistentItem(itm.getOid());
		item = itm;
	}
	 public void excute() {
		Visitor v = new SingleVisitor();
		try{
		v.update(item);
		}catch(SQLException e){System.out.println("sql wrong");}
	 }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -