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

📄 topicjsp.java

📁 野蔷薇论坛源码 java 自己看看吧。 学习用
💻 JAVA
字号:
/* 
 * Created on 2007-5-16
 * Last modified on 2007-10-15
 * Powered by YeQiangWei.com
 */
package com.yeqiangwei.club.view.jsp;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.yeqiangwei.club.param.TopicParameter;
import com.yeqiangwei.club.service.ServiceLocator;
import com.yeqiangwei.club.service.ServiceWrapper;
import com.yeqiangwei.club.service.model.ReplyModel;
import com.yeqiangwei.club.service.model.TopicModel;
import com.yeqiangwei.club.service.topic.ReplyService;
import com.yeqiangwei.club.service.topic.TopicService;
import com.yeqiangwei.club.util.BeanLocator;
import com.yeqiangwei.club.util.BeanUtils;
import com.yeqiangwei.club.view.model.ReplyView;
import com.yeqiangwei.club.view.model.TopicView;
import com.yeqiangwei.util.ParamUtils;

public class TopicJsp extends BaseJsp{

	public TopicJsp(HttpServletRequest request, HttpServletResponse response) {
		super(request, response);
	}
	
	public List<?> findTrash(int rows){
		if(com.yeqiangwei.util.ParamUtils.getStringParameter(request,"act").equals("listreply")){
			return this.findTrashReply(rows);
		}else{
			return this.findTrashTopic(rows);
		}
	}
	public List<TopicView> findTrashTopic(int rows){
		TopicParameter param = new TopicParameter();
		param.setIsDeleted(true);
		param.setPage(ParamUtils.getIntParameter(request,"page",1));
		param.setRows(rows);
		List<TopicModel> mlist = this.getTopicService().findByParameter(param);
		List<TopicView> list = BeanUtils.copyList(mlist,BeanLocator.TOPICVIEW);
		return list;
	}
	
	public List<ReplyView> findTrashReply(int rows){
		TopicParameter param = new TopicParameter();
		param.setIsDeleted(true);
		param.setPage(ParamUtils.getIntParameter(request,"page",1));
		param.setRows(rows);
		List<ReplyModel> mlist = this.getReplyService().findByParameter(param);
		List<ReplyView> list = BeanUtils.copyList(mlist,BeanLocator.REPLYVIEW);
		return list;
	}
	
	private TopicService getTopicService() {
		return ServiceWrapper.<TopicService>getSingletonInstance(ServiceLocator.TOPIC);
	}
	
	private ReplyService getReplyService() {
		return ServiceWrapper.<ReplyService>getSingletonInstance(ServiceLocator.REPLY);
	}
}

⌨️ 快捷键说明

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