?? 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 每頁記錄數(shù)
* @return 返回留言列表
* @throws DataAccessException
*/
public List getList(int pos, int size) throws DataAccessException;
/**
* @return
*/
/**
* @param parentId 如果等于-1,即為留言,不為-1即為回復(fù)
* @param pos 記錄起始位置
* @param size 每頁記錄數(shù)
* @return 返回回復(fù)或者留言列表
* @throws DataAccessException
*/
public List getReplyList(Integer parentId, int pos, int size)
throws DataAccessException;
/**
* 根據(jù)ID返回Guestbook
*
* @param id
* @return Guestbook對象
* @throws DataAccessException
*/
public Guestbook getGuestbook(Integer id) throws DataAccessException;
/**
* 回復(fù)總數(shù)
*
* @param parentId 留言ID
* @return 回復(fù)總數(shù)
* @throws DataAccessException
*/
public Integer getReplyCount(Integer parentId) throws DataAccessException;
/**
* /**
* 根據(jù)ID記算回復(fù)主數(shù)
*
* @param parentId
* @return 回復(fù)總數(shù)
*/
public Integer getCommentCount(Integer parentId)
throws DataAccessException;
/**
* @return 計算總共花費時間
*/
public Integer getSumTime() throws DataAccessException;
/**
* 根據(jù)ID刪除一個對象
*
* @param id
* @throws DataAccessException
*/
public void doDeleteTopic(Integer id) throws DataAccessException;
/**
* @return 留言總數(shù)
*/
public Integer getCount() throws DataAccessException;
/**
* 設(shè)置置頂操作
*
* @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;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -