📄 exmform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.sean.pet.controller.form;
import java.sql.Date;
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.EmployeeDao;
import com.sean.pet.hibernate.dao.PetDao;
import com.sean.pet.hibernate.dao.impl.EmployeeDaoImpl;
import com.sean.pet.hibernate.dao.impl.PetDaoImpl;
import com.sean.pet.hibernate.po.Employee;
import com.sean.pet.hibernate.po.Examination;
import com.sean.pet.hibernate.po.Pet;
/**
* MyEclipse Struts
* Creation date: 08-07-2008
*
* XDoclet definition:
* @struts.form name="exmForm"
*/
public class ExmForm extends ActionForm {
/*
* Generated fields
*/
/** time property */
private String time;
/** petid property */
private String petid;
/** empid property */
private String empid;
/** edesc property */
private String edesc;
/** id property */
private String id;
private Employee employee;
private Pet pet;
private Set pettreatments = new HashSet(0);
private Date dtime;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public Examination valueOfUsers(){
Examination exm = new Examination();
exm.setId(this.id);
exm.setTime(this.dtime);
exm.setEdesc(this.edesc);
exm.setEmployee(this.employee);
exm.setPet(this.pet);
exm.setPettreatments(this.pettreatments);
return exm;
}
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 void setTime(String time) {
this.time = time;
}
public String getTime() {
return time;
}
/**
* Set the time.
* @param time The time to set
*/
public Date getDtime() {
// Date dtime = Date.valueOf(this.time);
return dtime;
}
public void setDtime(Date dtime) {
this.dtime = dtime;
}
/**
* 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 empid.
* @return String
*/
public String getEmpid() {
return empid;
}
/**
* Set the empid.
* @param empid The empid to set
*/
public void setEmpid(String empid) {
this.empid = empid;
}
/**
* Returns the edesc.
* @return String
*/
public String getEdesc() {
return edesc;
}
/**
* Set the edesc.
* @param edesc The edesc to set
*/
public void setEdesc(String edesc) {
this.edesc = edesc;
}
/**
* 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 Employee getEmployee() {
EmployeeDao empDao = new EmployeeDaoImpl();
this.employee = empDao.findByID(this.empid);
return employee;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
public Pet getPet() {
PetDao petDao = new PetDaoImpl();
this.pet = petDao.findByID(this.petid);
return pet;
}
public void setPet(Pet pet) {
this.pet = pet;
}
public Set getPettreatments() {
return pettreatments;
}
public void setPettreatments(Set pettreatments) {
this.pettreatments = pettreatments;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -