📄 updatehairform.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package barbershop.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;
import org.apache.struts.upload.FormFile;
/**
* MyEclipse Struts
* Creation date: 12-17-2008
*
* XDoclet definition:
* @struts.form name="addHairForm"
*/
public class UpdateHairForm extends ActionForm {
/*
* Generated fields
*/
/** hairType property */
private String hairType;
/** hairID property */
private String hairID;
/** hairPrice property */
private String hairPrice;
/** hairSrc property */
private FormFile hairSrc;
/** hairSex property */
private String hairSex;
/** hairName property */
private String hairName;
/** hairPic property */
private FormFile hairPic;
private String modifyFlag;
/*
* Generated Methods
*/
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors = new ActionErrors();
if(this.hairID == null || this.hairID.equals(""))
{
errors.add("hairID", new ActionMessage("error.hairid.null"));
}
if(this.hairName == null || this.hairName.equals(""))
{
errors.add("hairName", new ActionMessage("error.hairname.null"));
}
if(this.hairPrice == null || this.hairPrice.equals(""))
{
errors.add("hairPrice", new ActionMessage("error.hairprice.null"));
}
if(this.hairPic == null)
{
errors.add("hairPic", new ActionMessage("error.hairpic.null"));
}
if(this.hairSrc == null)
{
errors.add("hairSrc", new ActionMessage("error.hairsrc.null"));
}
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
// TODO Auto-generated method stub
this.hairID="";
this.hairName="";
this.hairPrice="";
this.hairPic=null;
this.hairSrc=null;
}
/**
* Returns the hairType.
* @return String
*/
public String getHairType() {
return hairType;
}
/**
* Set the hairType.
* @param hairType The hairType to set
*/
public void setHairType(String hairType) {
this.hairType = hairType;
}
/**
* Returns the hairID.
* @return String
*/
public String getHairID() {
return hairID;
}
/**
* Set the hairID.
* @param hairID The hairID to set
*/
public void setHairID(String hairID) {
this.hairID = hairID;
}
/**
* Returns the hairPrice.
* @return String
*/
public String getHairPrice() {
return hairPrice;
}
/**
* Set the hairPrice.
* @param hairPrice The hairPrice to set
*/
public void setHairPrice(String hairPrice) {
this.hairPrice = hairPrice;
}
/**
* Returns the hairSrc.
* @return String
*/
public FormFile getHairSrc() {
return hairSrc;
}
/**
* Set the hairSrc.
* @param hairSrc The hairSrc to set
*/
public void setHairSrc(FormFile hairSrc) {
this.hairSrc = hairSrc;
}
/**
* Returns the hairSex.
* @return String
*/
public String getHairSex() {
return hairSex;
}
/**
* Set the hairSex.
* @param hairSex The hairSex to set
*/
public void setHairSex(String hairSex) {
this.hairSex = hairSex;
}
/**
* Returns the hairName.
* @return String
*/
public String getHairName() {
return hairName;
}
/**
* Set the hairName.
* @param hairName The hairName to set
*/
public void setHairName(String hairName) {
this.hairName = hairName;
}
/**
* Returns the hairPic.
* @return String
*/
public FormFile getHairPic() {
return hairPic;
}
/**
* Set the hairPic.
* @param hairPic The hairPic to set
*/
public void setHairPic(FormFile hairPic) {
this.hairPic = hairPic;
}
public String getModifyFlag() {
return modifyFlag;
}
public void setModifyFlag(String modifyFlag) {
this.modifyFlag = modifyFlag;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -