noticegameresultaction.java

来自「学习dwr+struts2+spring进行开发的好例子」· Java 代码 · 共 69 行

JAVA
69
字号
package com.szhelper.lotteryWeb.webapp.action;

import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

import org.extremecomponents.table.limit.Limit;

import com.szhelper.lotteryWeb.Constants;
import com.szhelper.lotteryWeb.model.NoticeGameResult;
import com.szhelper.lotteryWeb.service.INoticeGameResultService;
import com.szhelper.lotteryWeb.util.DateUtil;
import com.szhelper.lotteryWeb.util.ExtremeTablePage;
import com.szhelper.lotteryWeb.util.PageBean;

public class NoticeGameResultAction extends LotteryWebBaseAction {

	private NoticeGameResult noticeGameResult;
	private Collection<NoticeGameResult> noticeGameResults;
	private INoticeGameResultService noticeGameResultService;

	private String parameter_issue, parameter_specialCode, parameter_winCode;
	private Integer parameter_gameId, parameter_fromSale, parameter_toSale;
	private Date parameter_fromAwardTime, parameter_toAwardTime;

	public String save() throws Exception {
		freshUpdateDate();
		noticeGameResult.setUpdateDate(updateDate);
		if (getNoticeGameResultService().saveNoticeGameResult(noticeGameResult)) {
			return SUCCESS;
		}
		return ERROR;
	}

	public String update() throws Exception {
		freshUpdateDate();
		noticeGameResult.setUpdateDate(updateDate);
		if (getNoticeGameResultService().updateNoticeGameResult(
				noticeGameResult)) {
			return SUCCESS;
		}
		return ERROR;
	}

	public String delete() throws Exception {
		if (null != id) {
			if (getNoticeGameResultService().deleteNoticeGameResult(
					id.intValue()))
				return SUCCESS;
		} /*
			 * else { if
			 * (getNoticeGameResultService().deleteNoticeGameResult(id.intValue()))
			 * return SUCCESS; }
			 */
		return ERROR;
	}

	public String load() {
		noticeGameResult = getNoticeGameResultService()
				.getNoticeGameResultByKey(id);
		return SUCCESS;
	}

	public String list() {
		try {
			Limit limit = ExtremeTablePage.getLimit(request, defaultPageSize);
			PageBean page = new PageBean();
			page.setPageSize(limit.getCurrentRowsDisplayed()); // ecͨ��limit���

⌨️ 快捷键说明

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