📄 serchspecityform.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-24-2008
*
* XDoclet definition:
* @struts.form name="serchSpecityForm"
*/
public class SerchSpecityForm extends ActionForm {
/*
* Generated fields
*/
/** beginTime property */
private String beginTime;
/** type property */
private String type;
/** endTime property */
private String endTime;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors=new ActionErrors();
/**
* 检测时间输入是否合法
*/
if(this.getBeginTime()==null||this.getBeginTime().length()<1){
errors.add("beginTime",new ActionMessage("NotNull.error"));
}else if(this.getEndTime()==null||this.getEndTime().length()<1){
errors.add("endTime",new ActionMessage("NotNull.error"));
}else if(!ValidTime.checkDate(this.getBeginTime())){
errors.add("beginTime",new ActionMessage("Datetype"));
}else if(!ValidTime.checkDate(this.getEndTime())){//输入数据不对
errors.add("endTime",new ActionMessage("Datetype"));
}else if((this.getBeginTime().compareTo(this.getEndTime()))>0){
errors.add("endTime",new ActionMessage("Time.error"));
}
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
}
/**
* Returns the beginTime.
* @return String
*/
public String getBeginTime() {
return beginTime;
}
/**
* Set the beginTime.
* @param beginTime The beginTime to set
*/
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
/**
* Returns the type.
* @return String
*/
public String getType() {
return type;
}
/**
* Set the type.
* @param type The type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* Returns the endTime.
* @return String
*/
public String getEndTime() {
return endTime;
}
/**
* Set the endTime.
* @param endTime The endTime to set
*/
public void setEndTime(String endTime) {
this.endTime = endTime;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -