addprojectform.java

来自「icome」· Java 代码 · 共 137 行

JAVA
137
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.icome.struts.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
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: 12-17-2006
 * 
 * XDoclet definition:
 * @struts.form name="addProjectForm"
 */
public class AddProjectForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** about property */
	private String about;

	/** developer property */
	private String developer;

	/** state property */
	private Integer state = 0;

	/** name property */
	private String name;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		
		ActionErrors actionerrs = new ActionErrors();
		
		if(name==null||name.equalsIgnoreCase(""))
		{
			actionerrs.add("ProjectNameNull", new ActionMessage("ProjectNameNull"));
		}
		return actionerrs;
	}

	/** 
	 * Method reset
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {

		about = null;
		developer = null;
		name = null;
		state = 0;
	}

	/** 
	 * Returns the about.
	 * @return String
	 */
	public String getAbout() {
		return about;
	}

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

	/** 
	 * Returns the developer.
	 * @return String
	 */
	public String getDeveloper() {
		return developer;
	}

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

	/** 
	 * Returns the state.
	 * @return Integer
	 */
	public Integer getState() {
		return state;
	}

	/** 
	 * Set the state.
	 * @param state The state to set
	 */
	public void setState(Integer state) {
		this.state = state;
	}

	/** 
	 * Returns the name.
	 * @return String
	 */
	public String getName() {
		return name;
	}

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

⌨️ 快捷键说明

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