📄 topicjsp.java
字号:
/*
* Created on 2007-5-16
* Last modified on 2007-5-16
* 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){
List list = null;
if(com.yeqiangwei.util.ParamUtils.getStringParameter(request,"act").equals("listreply")){
list = this.findTrashReply(rows);
}else{
list = this.findTrashTopic(rows);
}
return list;
}
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 + -