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

📄 noticecommentserviceimpl.java

📁 学习dwr+struts2+spring进行开发的好例子
💻 JAVA
字号:
package com.szhelper.lotteryWeb.service.impl;

import java.util.List;

import com.szhelper.lotteryWeb.dao.INoticeCommentDao;
import com.szhelper.lotteryWeb.exception.NoticeCommentExistsException;
import com.szhelper.lotteryWeb.model.NoticeComment;
import com.szhelper.lotteryWeb.service.INoticeCommentService;
import com.szhelper.lotteryWeb.util.PageBean;

public class NoticeCommentServiceImpl implements INoticeCommentService {
	private INoticeCommentDao noticeCommentDao;

	public void setNoticeCommentDao(INoticeCommentDao noticeCommentDao) {
		this.noticeCommentDao = noticeCommentDao;
	}

	public NoticeComment getNoticeCommentByKey(int noticeCommentId) {
		return noticeCommentDao.findByKey(noticeCommentId);
	}

	/*public NoticeComment getNoticeCommentByNoticeCommentname(
			String NoticeCommentname) {
		return null;
	}*/

	/**
	 * Retrieves a list of NoticeComments, filtering with parameters on a
	 * NoticeComment object
	 * 
	 * @return List
	 */
	public List getNoticeCommentList() {
		return noticeCommentDao.list();		
	}

	/**
	 * Saves a NoticeComment's information.
	 * 
	 * @param NoticeComment
	 *            the NoticeComment's information
	 * @throws NoticeCommentExistsException
	 *             thrown when NoticeComment already exists
	 * @return NoticeComment the updated NoticeComment object
	 */
	public boolean saveNoticeComment(NoticeComment noticeComment)
			throws NoticeCommentExistsException {
		return noticeCommentDao.save(noticeComment);
	}

	public boolean updateNoticeComment(NoticeComment noticeComment)
			throws NoticeCommentExistsException {
		return noticeCommentDao.update(noticeComment);
	}

	/**
	 * Removes a NoticeComment from the database by their noticeCommentId
	 * 
	 * @param noticeCommentId
	 *            the NoticeComment's id
	 */
	public boolean deleteNoticeComment(int noticeCommentId) {
		return noticeCommentDao.delete(noticeCommentId);
	}
	
	public List getNoticeCommentPageList(PageBean page) {
		return noticeCommentDao
				.getPageList(page);
	}
}

⌨️ 快捷键说明

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