newsservice.java
来自「struts spring hibernate实现的简单新闻系统」· Java 代码 · 共 42 行
JAVA
42 行
package com.pure.business.service;
import java.util.List;
import com.pure.bean.News;
import com.pure.business.INewsService;
import com.pure.comm.Page;
import com.pure.dao.INewsDAO;
public class NewsService implements INewsService {
private INewsDAO newsDao;
public NewsService() {
}
public News save(News news) {
return this.getNewsDao().save(news);
}
public INewsDAO getNewsDao() {
return newsDao;
}
public void setNewsDao(INewsDAO newsDao) {
this.newsDao = newsDao;
}
public List getList(Page page) {
return this.getNewsDao().getList(page);
}
public int getTotal(String hql) {
return this.getNewsDao().getTotal(hql);
}
public void remove(int id){
this.getNewsDao().remove(id);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?