wt1102form.java

来自「一个完整的物流系统」· Java 代码 · 共 207 行

JAVA
207
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package jp.com.cost.wt.web.form;

import javax.servlet.http.HttpServletRequest;

import jp.com.cost.common.DataCheckor;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 * MyEclipse Struts Creation date: 09-02-2008
 * 
 * XDoclet definition:
 * 
 * @struts.form name="WT1201Form"
 */
public class WT1102Form extends ActionForm {
	/*
	 * Generated fields
	 */

	/** id property */
	private String id;
	private String sendperon;
	private String receperson;
	private String notifyperson;
	private String type;
	private double size;
	private double weight;
	private String receplace;
	private String deliplace;
	private double trafree;
	private double dealcost;
	private String transway;
	private String company;

	/*
	 * 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();
		DataCheckor d=new DataCheckor();
		
		if (d.isNull(deliplace)) {
			errors.add("deliplaceError", new ActionMessage("WT1201Form.deliplace"));
		} 
		if (d.isNull(transway)) {
			errors.add("transwayError", new ActionMessage("WT1201Form.transway"));
		} 
		if (d.isNull(company)) {
			errors.add("companyError", new ActionMessage("WT1201Form.company"));
		} 
		if (d.isNull(Double.toString(size))||d.isNotNumber(Double.toString(size))) {
			errors.add("sizeError", new ActionMessage("WT1201Form.size"));
		} 

		/*
		 * if(password==null||password.trim().length()==0){
		 * errors.add("password",new ActionMessage("login.password.empty"));
		 * }else{ if(password.trim().length()<6){ errors.add("password",new
		 * ActionMessage("login.password.length")); } }
		 */

		return errors;
	}

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

	/**
	 * Returns the id.
	 * 
	 * @return String
	 */
	public String getId() {
		return id;
	}

	/**
	 * Set the id.
	 * 
	 * @param id
	 *            The id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	public String getSendperon() {
		return sendperon;
	}

	public void setSendperon(String sendperon) {
		this.sendperon = sendperon;
	}

	public String getReceperson() {
		return receperson;
	}

	public void setReceperson(String receperson) {
		this.receperson = receperson;
	}

	public String getNotifyperson() {
		return notifyperson;
	}

	public void setNotifyperson(String notifyperson) {
		this.notifyperson = notifyperson;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public double getSize() {
		return size;
	}

	public void setSize(double size) {
		this.size = size;
	}

	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}

	public String getReceplace() {
		return receplace;
	}

	public void setReceplace(String receplace) {
		this.receplace = receplace;
	}

	public String getDeliplace() {
		return deliplace;
	}

	public void setDeliplace(String deliplace) {
		this.deliplace = deliplace;
	}

	public double getTrafree() {
		return trafree;
	}

	public void setTrafree(double trafree) {
		this.trafree = trafree;
	}

	public double getDealcost() {
		return dealcost;
	}

	public void setDealcost(double dealcost) {
		this.dealcost = dealcost;
	}

	public String getTransway() {
		return transway;
	}

	public void setTransway(String transway) {
		this.transway = transway;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}
}

⌨️ 快捷键说明

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