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

📄 appform.java

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

//import java.util.Date;
import java.sql.Date;
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.Appointment;
import com.sean.pet.hibernate.po.Pet;

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

	/** time property */
	private Date time;

	/** petid property */
	private String petid;

	/** id property */
	private String id;
	
	private String atime;
	
	private Pet pet;

	/*
	 * Generated Methods
	 */

	/** 
	 * Method validate
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public Appointment valueOfUsers(){
		Appointment app = new Appointment();
		app.setId(this.id);
		app.setPet(this.pet);
		app.setTime(this.time);
		return app;
	}
	
	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 time.
	 * @return Date
	 */
	public Date getTime() {
		return time;
	}

	/** 
	 * Set the time.
	 * @param time The time to set
	 */
	public void setTime(Date time) {
		this.time = time;
	}

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

	public String getAtime() {
		return atime;
	}

	public void setAtime(String atime) {
		this.atime = atime;
	}

	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 + -