commentserviceimpl.java

来自「EasyJF开源新闻系统是一个由EasyJF开源团队组织开发的基于Java平台的」· Java 代码 · 共 52 行

JAVA
52
字号
/**
 * 版权声明  EasyJF, 版权所有 违者必究
 * 版本号  0.1
 *创建者:张钰
 * 时 间:2006-4-6
 * 描 述:创建
 */
package com.easyjf.news.logic.impl;

import java.util.Collection;
import java.util.List;

import com.easyjf.news.logic.CommentService;
import com.easyjf.news.model.Comment;

public class CommentServiceImpl extends DAOSupportService implements
		CommentService {
private static CommentServiceImpl commentDAO=new CommentServiceImpl();
public static CommentServiceImpl getInstance(){
	return commentDAO;
}
	public boolean saveComment(Comment comment) {
		// TODO 自动生成方法存根
		return this.dao.save(comment);
	}

	public boolean updateComment(Comment comment) {
		// TODO 自动生成方法存根
		return this.dao.update(comment);
	}

	public boolean delComment(Comment comment) {
		// TODO 自动生成方法存根
		return this.dao.del(comment);
	}

	public List getComment() {
		// TODO 自动生成方法存根
		return this.dao.query(Comment.class,"id!=''");
	}

	public Comment getCommentById(String id) {
		// TODO 自动生成方法存根
		return (Comment)this.dao.get(Comment.class,id);
	}
	public List getCommBySql(String sql, Collection paras, int begin, int end) {
		// TODO Auto-generated method stub
		return this.dao.query(Comment.class,sql,paras,begin,end);
	}

}

⌨️ 快捷键说明

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