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

📄 changeform.java

📁 纯jsp做的人事招聘系统
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.yourcompany.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;

/**
 * MyEclipse Struts Creation date: 10-15-2008
 * 
 * XDoclet definition:
 * 
 * @struts.form name="changeForm"
 */
public class ChangeForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** needs property */
	private String needs;

	/** no property */
	private String no;

	/** position property */
	private String position;

	/** com_name property */
	private String com_name;

	/** quantity property */
	private String quantity;

	/*
	 * Generated Methods
	 */

	/**
	 * Method validate
	 * 
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		ActionErrors errors = new ActionErrors();
		int begin = 0;
		if (quantity == null || quantity.trim().equals("")) {
			errors.add("quantity", new ActionMessage("error.update.quantity",
					quantity));
		} else {
			quantity = quantity.trim();
			if (quantity.startsWith("+") || quantity.startsWith("-")) {
				if (quantity.length() == 1) {
					// "+" "-"
					errors.add("quantity", new ActionMessage(
							"error.update.quantity", quantity));
				}
				begin = 1;
			}
			for (int i = begin; i < quantity.length(); i++) {
				if (!Character.isDigit(quantity.charAt(i))) {
					errors.add("quantity", new ActionMessage(
							"error.update.quantity", quantity));
				}
			}
		}
		return errors;
	}

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

	/**
	 * Returns the needs.
	 * 
	 * @return String
	 */
	public String getNeeds() {
		return needs;
	}

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

	/**
	 * Returns the no.
	 * 
	 * @return String
	 */
	public String getNo() {
		return no;
	}

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

	/**
	 * Returns the position.
	 * 
	 * @return String
	 */
	public String getPosition() {
		return position;
	}

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

	/**
	 * Returns the com_name.
	 * 
	 * @return String
	 */
	public String getCom_name() {
		return com_name;
	}

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

	/**
	 * Returns the quantity.
	 * 
	 * @return String
	 */
	public String getQuantity() {
		return quantity;
	}

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

⌨️ 快捷键说明

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