noticenewsdetailserviceimpl.java.svn-base

来自「学习dwr+struts2+spring进行开发的好例子」· SVN-BASE 代码 · 共 70 行

SVN-BASE
70
字号
package com.szhelper.lotteryWeb.service.impl;

import java.util.List;

import com.szhelper.lotteryWeb.dao.INoticeNewsDetailDao;
import com.szhelper.lotteryWeb.model.NoticeNewsDetail;
import com.szhelper.lotteryWeb.service.INoticeNewsDetailService;
import com.szhelper.lotteryWeb.util.PageBean;

public class NoticeNewsDetailServiceImpl implements INoticeNewsDetailService {
	private INoticeNewsDetailDao noticeNewsDetailDao;

	public void setNoticeNewsDetailDao(INoticeNewsDetailDao noticeNewsDetailDao) {
		this.noticeNewsDetailDao = noticeNewsDetailDao;
	}

	public NoticeNewsDetail getNoticeNewsDetailByKey(int noticeNewsDetailId) {
		return noticeNewsDetailDao.findByKey(noticeNewsDetailId);
	}

	/*public NoticeNewsDetail getNoticeNewsDetailByNoticeNewsDetailname(
			String noticeNewsDetailname) {
		return null;
	}*/

	/**
	 * Retrieves a list of NoticeNewsDetails, filtering with parameters on a
	 * NoticeNewsDetail object
	 * 
	 * @return List
	 */
	public List getNoticeNewsDetailList() {
		return noticeNewsDetailDao.list();		
	}

	/**
	 * Saves a NoticeNewsDetail's information.
	 * 
	 * @param NoticeNewsDetail
	 *            the NoticeNewsDetail's information
	 * @throws NoticeNewsDetailExistsException
	 *             thrown when NoticeNewsDetail already exists
	 * @return NoticeNewsDetail the updated NoticeNewsDetail object
	 */
	public boolean saveNoticeNewsDetail(NoticeNewsDetail noticeNewsDetail)
			{
		return noticeNewsDetailDao.save(noticeNewsDetail);
	}

	public boolean updateNoticeNewsDetail(NoticeNewsDetail noticeNewsDetail)
			 {
		return noticeNewsDetailDao.update(noticeNewsDetail);
	}

	/**
	 * Removes a NoticeNewsDetail from the database by their NoticeNewsDetailId
	 * 
	 * @param NoticeNewsDetailId
	 *            the NoticeNewsDetail's id
	 */
	public boolean deleteNoticeNewsDetail(int noticeNewsDetailId) {
		return noticeNewsDetailDao.delete(noticeNewsDetailId);
	}
	
	public List getNoticeNewsDetailPageList(PageBean page) {
		return noticeNewsDetailDao
				.getPageList(page);
	}
}

⌨️ 快捷键说明

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