纯jsp做的人事招聘系统

源代码在线查看: insertform.java

软件大小: 1680 K
上传用户: haoding306
关键词: jsp
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*
				 * 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="insertForm"
				 */
				public class InsertForm extends ActionForm {
					/*
					 * Generated fields
					 */
				
					/** needs property */
					private String needs;
				
					/** position property */
					private String position;
				
					/** com_name property */
					private String com_name;
					
					private String quantity;
				
					/*
					 * Generated Methods
					 */
				
					public String getQuantity() {
						return quantity;
					}
				
					public void setQuantity(String quantity) {
						this.quantity = quantity;
					}
				
					/** 
					 * 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));
									i=quantity.length();
								}
							}
						}
						return errors;
					}
				
					/** 
					 * Method reset
					 * @param mapping
					 * @param request
					 */
					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 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;
					}
				}			

相关资源