nsreplyproxyimp.java

来自「一个成熟的论坛」· Java 代码 · 共 38 行

JAVA
38
字号
package com.singnet.dwr.imp;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.singnet.bean.NsReply;
import com.singnet.business.INsReplyService;
import com.singnet.data.PageData;
import com.singnet.data.SysConfig;
import com.singnet.dwr.INsReplyProxy;

public class NsReplyProxyImp implements INsReplyProxy
{
	private INsReplyService			nsReplyService;

	public PageData loadPageList(long threadID, int pageNo)
	{
		// TODO Auto-generated method stub
		DetachedCriteria dc = DetachedCriteria.forClass(NsReply.class)
		.add(Restrictions.eq("postPid", new Long(threadID)))
		.addOrder(Order.asc("postCtime"));
		return nsReplyService.findPageList(dc, SysConfig.REPLY_PAGE_SIZE, (pageNo - 1) * SysConfig.REPLY_PAGE_SIZE);
	}

	public void setNsReplyService(INsReplyService nsReplyService)
	{
		this.nsReplyService = nsReplyService;
	}

	public void saveReply(NsReply reply)
	{
		// TODO Auto-generated method stub
		nsReplyService.saveOrUpdate(reply);
	}

}

⌨️ 快捷键说明

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