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

📄 penform.java

📁 用Struts+hibernate写的宠物医院
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.sean.pet.controller.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 com.sean.pet.hibernate.dao.PetDao;
import com.sean.pet.hibernate.dao.impl.PetDaoImpl;
import com.sean.pet.hibernate.po.Pen;
import com.sean.pet.hibernate.po.Pet;

/** 
 * MyEclipse Struts
 * Creation date: 08-07-2008
 * 
 * XDoclet definition:
 * @struts.form name="penForm"
 */
public class PenForm extends ActionForm {
	/*
	 * Generated fields
	 */

	/** petid property */
	private String petid;

	/** state property */
	private String state;

	/** id property */
	private String id;

	/** v property */
	private String v;
	
	private Pet pet;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public Pen valueOfUsers(){
		Pen pen = new Pen();
		pen.setId(this.id);
		pen.setV(this.v);
		pen.setState(this.state);
		pen.setPet(this.pet);
		return pen;
	}
	
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

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

	/** 
	 * Returns the petid.
	 * @return String
	 */
	public String getPetid() {
		return petid;
	}

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

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

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

	/** 
	 * 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;
	}

	/** 
	 * Returns the v.
	 * @return String
	 */
	public String getV() {
		return v;
	}

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

	public Pet getPet() {
		PetDao petDao = new PetDaoImpl();
		this.pet = petDao.findByID(this.petid);
		return pet;
	}

	public void setPet(Pet pet) {
		this.pet = pet;
	}
}

⌨️ 快捷键说明

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