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

📄 petform.java

📁 用Struts+hibernate写的宠物医院
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.sean.pet.controller.form;

import java.util.HashSet;
import java.util.Set;

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.PetownerDao;
import com.sean.pet.hibernate.dao.impl.PetownerDaoImpl;
import com.sean.pet.hibernate.po.Pen;
import com.sean.pet.hibernate.po.Pet;
import com.sean.pet.hibernate.po.Petowner;
import com.sean.pet.modelfactory.ModelFactory;

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

	/** type property */
	private String type;

	/** djtime property */
	private String djtime;

	/** state property */
	private String state;

	/** poid property */
	private String poid;

	/** name property */
	private String name;

	/** id property */
	private String id;
	
	/** birthday property */
	private String birthday;
	
	private Petowner po;

	private Set pens = new HashSet(0);
	private Set appointments = new HashSet(0);
	private Set examinations = new HashSet(0);
	private Set invoices = new HashSet(0);
	/*
	 * Generated Methods
	 */

	public Pet valueOfUsers(){
		Pet pet = new Pet();
		pet.setId(this.id);
		pet.setName(this.name);
		pet.setType(this.type);
		pet.setBirthday(this.birthday);
		pet.setDjtime(this.djtime);
		pet.setState(this.state);
		pet.setPetowner(this.po);
		pet.setAppointments(this.appointments);
		pet.setInvoices(this.invoices);
		pet.setExaminations(this.examinations);
		pet.setPens(this.pens);
		return pet;
	}
	
	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	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 type.
	 * @return String
	 */
	public String getType() {
		return type;
	}

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

	/** 
	 * Returns the djtime.
	 * @return String
	 */
	public String getDjtime() {
		return djtime;
	}

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

	/** 
	 * 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 poid.
	 * @return String
	 */
	public String getPoid() {
		return poid;
	}

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

	/** 
	 * 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 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 birthday.
	 * @return String
	 */
	public String getBirthday() {
		return birthday;
	}

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

	public Petowner getPo() {
		PetownerDao poDao = new PetownerDaoImpl();
		this.po = poDao.findByID(this.poid);
		return po;
	}

	public void setPo(Petowner po) {
		this.po = po;
	}

	public Set getPens() {
		return pens;
	}

	public void setPens(Set pens) {
		this.pens = pens;
	}

	public Set getAppointments() {
		return appointments;
	}

	public void setAppointments(Set appointments) {
		this.appointments = appointments;
	}

	public Set getExaminations() {
		return examinations;
	}

	public void setExaminations(Set examinations) {
		this.examinations = examinations;
	}

	public Set getInvoices() {
		return invoices;
	}

	public void setInvoices(Set invoices) {
		this.invoices = invoices;
	}
}

⌨️ 快捷键说明

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