📄 view.java
字号:
package com.foshanshop.jsf;
import com.foshanshop.bean.News;
import com.foshanshop.dao.NewsLocalDAO;
import com.foshanshop.utils.EJBFactory;
/**
* 单条新闻查看
* @author lihuoming
*
*/
public class View {
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public News getNews() {
NewsLocalDAO newsdao = (NewsLocalDAO)EJBFactory.lookup("ejb/NewsLocalDAO");
News news = newsdao.find(News.class, this.id);
return news;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -