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

📄 updatestudentform.java

📁 这是一个用Struts+Hibernate+Tomcat5.5.9实现的一个“课程管理系统”
💻 JAVA
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.0.0/xslt/JavaClass.xslpackage 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: 11-14-2005 *  * XDoclet definition: * @struts.form name="updateStudentForm" */public class UpdateStudentForm extends ActionForm {	// --------------------------------------------------------- Instance Variables	/** password property */	private String password;		private String student_number;		private Integer age;		private String address;	/** sex property */	private String sex;	/** mark property */	private Integer mark;	/** dep property */	private String department;	/** username property */	private String username;	/** mail property */	private String email;	/** tel property */	private String telephone;	/** name property */	private String name;	/** id property */	private Long id;		private Long teacher_id;	// --------------------------------------------------------- Methods	public Long getTeacher_id() {		return teacher_id;	}	public void setTeacher_id(Long teacher_id) {		this.teacher_id = teacher_id;	}	/** 	 * Method validate	 * @param mapping	 * @param request	 * @return ActionErrors	 */	public ActionErrors validate(		ActionMapping mapping,		HttpServletRequest request) {		        ActionErrors errors = new ActionErrors();                if ((sex == null) || (sex.length() < 1))            errors.add("sex", new ActionMessage("error.sex.required"));                if ((username == null) || (username.length() < 1))            errors.add("username", new ActionMessage("error.username.required"));                if ((password == null) || (password.length() < 1))            errors.add("password", new ActionMessage("error.password.required"));                if ((email == null) || (email.length() < 1))            errors.add("email", new ActionMessage("error.email.required"));                if ((department == null) || (department.length() < 1))            errors.add("department", new ActionMessage("error.department.required"));                if ((telephone == null) || (telephone.length() < 1))            errors.add("telephone", new ActionMessage("error.telephone.required"));                if ((name == null) || (name.length() < 1))            errors.add("name", new ActionMessage("error.name.required"));                return errors; 	}	/** 	 * Method reset	 * @param mapping	 * @param request	 */	public void reset(ActionMapping mapping, HttpServletRequest request) {	}	/** 	 * Returns the password.	 * @return String	 */	public String getPassword() {		return password;	}	/** 	 * Set the password.	 * @param password The password to set	 */	public void setPassword(String password) {		this.password = password;	}	/** 	 * Returns the sex.	 * @return String	 */	public String getSex() {		return sex;	}	/** 	 * Set the sex.	 * @param sex The sex to set	 */	public void setSex(String sex) {		this.sex = sex;	}	/** 	 * Returns the mark.	 * @return String	 */	public Integer getMark() {		return mark;	}	/** 	 * Set the mark.	 * @param mark The mark to set	 */	public void setMark(Integer mark) {		this.mark = mark;	}	/** 	 * Returns the username.	 * @return String	 */	public String getUsername() {		return username;	}	/** 	 * Set the username.	 * @param username The username to set	 */	public void setUsername(String username) {		this.username = username;	}	public String getAddress() {		return address;	}	public void setAddress(String address) {		this.address = address;	}	public Integer getAge() {		return age;	}	public void setAge(Integer age) {		this.age = age;	}	public String getDepartment() {		return department;	}	public void setDepartment(String department) {		this.department = department;	}	public String getEmail() {		return email;	}	public void setEmail(String email) {		this.email = email;	}	public String getStudent_number() {		return student_number;	}	public void setStudent_number(String student_number) {		this.student_number = student_number;	}	public String getTelephone() {		return telephone;	}	public void setTelephone(String telephone) {		this.telephone = telephone;	}	/** 	 * 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;	}	/** 	 * Returns the id.	 * @return Long	 */	public Long getId() {		return id;	}	/** 	 * Set the id.	 * @param id The id to set	 */	public void setId(Long id) {		this.id = id;	}}

⌨️ 快捷键说明

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