📄 findfunctionbyid.java
字号:
package org.artemis.right.command;
import java.util.Map;
import org.artemis.right.dao.FunctionDao;
import org.artemis.right.model.Function;
import com.gsta.eshore.framework.jcf.Command;
import com.gsta.eshore.framework.jcf.JCFException;
public class FindFunctionById extends Command
{
private FunctionDao dao;
public void setDao(FunctionDao dao) {
this.dao = dao;
}
public void execute(Map params, Map response) throws Exception
{
//HQL语法
/*
String strHQL="select f from Function f where f.id=?";
Object[] param = {id};
List functions = dao.find(strHQL, param);
Function function=(Function)functions.get(0);
*/
//QBC语法
response.put("function",(Function)dao.getById(Function.class, (String) params.get("id")));
}
public void fini() throws JCFException
{
}
public void init(String arg0) throws JCFException
{
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -