addtypeform.java
来自「struts做得固定资产管理系统 带毕业论文完整版」· Java 代码 · 共 80 行
JAVA
80 行
package com.qrsx.appcam.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;
/**
* 增加类型 实体对象Form类
*
* @author Administrator
*
*/
public class AddTypeForm extends ActionForm {
private String id; // 主键
private String name; // 类型名称
private String description; // 描述
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (name == null || name.length() < 1) {
errors.add("name", new ActionMessage("assetTypeForm.name.required"));
}
return errors;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?