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

📄 statrfcform.java

📁 建立于Eclipse平台的WEB应用系统-物流管理系统变更模块
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package org.mychange.struts.form;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.mychange.ValidTime;

/** 
 * MyEclipse Struts
 * Creation date: 07-15-2008
 * 
 * XDoclet definition:
 * @struts.form name="statRFCForm"
 */
public class StatRFCForm extends ActionForm {


	private String startTime1;
	private String endTime1;

 
	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		
		/**
		 * 检查输入的时间是否有效
		 */
		ActionErrors errors=new ActionErrors();
		
		
		if(this.getStartTime1()==null||this.getStartTime1().length()<1){
			errors.add("type", new ActionMessage("NotNull.error"));			
		}
		else if(this.getEndTime1()==null||this.getEndTime1().length()<1){
			errors.add("type", new ActionMessage("NotNull.error"));			
		}
		
		else if(!ValidTime.checkDate(this.getStartTime1())){
			errors.add("type",new ActionMessage("Datetype"));
		}else if(!ValidTime.checkDate(this.getEndTime1())){
			errors.add("type",new ActionMessage("Datetype"));
		}else if(this.getStartTime1().compareTo(this.getEndTime1())>0){
			errors.add("time",new ActionMessage("Time.error"));
		}
		/**
		 * 时间在7天之内,提供每天统计
		 */
		/**
		 * 时间在7-31天之内,提供每周统计
		 */
		/**
		 * 时间在31之后,提供每月统计
		 */
		/**
		 * 时间在一年之后的,提供每年的统计
		 */
		return errors;
	}


	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
	}


	public String getEndTime1() {
		return endTime1;
	}

	public void setEndTime1(String endTime1) {
		this.endTime1 = endTime1;
	}

	
	public String getStartTime1() {
		return startTime1;
	}

	public void setStartTime1(String startTime1) {
		this.startTime1 = startTime1;
	}

	
}

⌨️ 快捷键说明

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