📄 employeeform.java
字号:
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;
public class EmployeeForm extends ActionForm {
private String id;// 编号 主键
private String code;// 员工代码
private String name;// 姓名
private String roleId;// 角色
private String deptmentId;// 所在部门编号
private String description;// 员工描述
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (code == null || code.length() < 1) {
errors.add("code", new ActionMessage("error.code.required"));
}
if (name == null || name.length() < 1) {
errors.add("name", new ActionMessage("error.name.required"));
}
return errors;
}
/**
* @return the code
*/
public String getCode() {
return code;
}
/**
* @return the deptmentId
*/
public String getDeptmentId() {
return deptmentId;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the roleId
*/
public String getRoleId() {
return roleId;
}
/**
* @param code the code to set
*/
public void setCode(String code) {
this.code = code;
}
/**
* @param deptmentId the deptmentId to set
*/
public void setDeptmentId(String deptmentId) {
this.deptmentId = deptmentId;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @param roleId the roleId to set
*/
public void setRoleId(String roleId) {
this.roleId = roleId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -