📄 guestbookservice.java
字号:
package com.cucu.tapestry.service;
import com.cucu.tapestry.dao.GuestbookDAO;
import com.cucu.tapestry.dao.PageHandle;
import com.cucu.tapestry.entity.Guestbook;
import org.springframework.dao.DataAccessException;
import java.util.List;
/**
* @author 绝情酷哥
* @version 1.0
*/
public interface GuestbookService {
/**
* 将guestbookDAO注入到service中来
*
* @param guestbookDAO
*/
public void setGuestbookDAO(GuestbookDAO guestbookDAO);
/**
* 将分页程序注入到service中来
*
* @param handle
*/
public void setPageHandle(PageHandle handle);
/**
* @param pos 记录起始位置
* @param size 每页记录数
* @return 返回留言列表
* @throws DataAccessException
*/
public List getList(int pos, int size) throws DataAccessException;
/**
* @return
*/
/**
* @param parentId 如果等于-1,即为留言,不为-1即为回复
* @param pos 记录起始位置
* @param size 每页记录数
* @return 返回回复或者留言列表
* @throws DataAccessException
*/
public List getReplyList(Integer parentId, int pos, int size)
throws DataAccessException;
/**
* 根据ID返回Guestbook
*
* @param id
* @return Guestbook对象
* @throws DataAccessException
*/
public Guestbook getGuestbook(Integer id) throws DataAccessException;
/**
* 回复总数
*
* @param parentId 留言ID
* @return 回复总数
* @throws DataAccessException
*/
public Integer getReplyCount(Integer parentId) throws DataAccessException;
/**
* /**
* 根据ID记算回复主数
*
* @param parentId
* @return 回复总数
*/
public Integer getCommentCount(Integer parentId)
throws DataAccessException;
/**
* @return 计算总共花费时间
*/
public Integer getSumTime() throws DataAccessException;
/**
* 根据ID删除一个对象
*
* @param id
* @throws DataAccessException
*/
public void doDeleteTopic(Integer id) throws DataAccessException;
/**
* @return 留言总数
*/
public Integer getCount() throws DataAccessException;
/**
* 设置置顶操作
*
* @param id 留言ID
* @throws DataAccessException
*/
public void doSetTop(Integer id) throws DataAccessException;
/**
* 新建或者修改一个guestbook
*
* @param gb Guestbook
* @throws DataAccessException
*/
public void doUpdateTopic(Guestbook gb) throws DataAccessException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -