📄 clientform.java
字号:
package com.qrsx.qrsxcrm.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 com.qrsx.qrsxcrm.model.ClientType;
import com.qrsx.qrsxcrm.model.Employee;
/**
* 客户实体form
* @author Administrator
*
*/
public class ClientForm extends ActionForm {
private String id; // 主键
private String clientName; // 客户名称
private String clientCode; // 客户编号
private String telephone; // 客户电话
private String address; // 客户住址
private String postCard; // 客户邮编
private String createDate; // 客户创建日期
private String clientTypeId; // 客户类型id
private String origin; // 客户来源
private String fax; //客户传真
private String employeeId; // 客户负责人id
private String email; //电子邮件
private String remark; //备注
private ClientType clientType; //级联一个客户类型
private Employee employee; //级联一个客户对象
/**
* FORM表单验证
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if((clientName == null)||(clientName.length()<1)){
errors.add("clientName",new ActionMessage("client.client.clientName"));
}
if((clientCode == null)||(clientCode.length()<1)){
errors.add("clientCode",new ActionMessage("client.client.clientCode"));
}
if((telephone == null)||(telephone.length()<1)){
errors.add("telephone",new ActionMessage("client.client.telephone"));
}
if((address == null)||(address.length()<1)){
errors.add("address",new ActionMessage("client.client.address"));
}
if((postCard == null)||(postCard.length()<1)){
errors.add("postCard",new ActionMessage("client.client.postcard"));
}
if((clientTypeId == null)||(clientTypeId.length()<1)){
errors.add("clientTypeId",new ActionMessage("client.client.clientTypeId"));
}
if((origin == null)||(origin.length()<1)){
errors.add("origin",new ActionMessage("client.client.origin"));
}
if((employeeId == null)||(employeeId.length()<1)){
errors.add("employeeId",new ActionMessage("client.client.employeeId"));
}
return errors;
}
/**
* @return the address
*/
public String getAddress() {
return address;
}
/**
* @param address the address to set
*/
public void setAddress(String address) {
this.address = address;
}
/**
* @return the clientCode
*/
public String getClientCode() {
return clientCode;
}
/**
* @param clientCode the clientCode to set
*/
public void setClientCode(String clientCode) {
this.clientCode = clientCode;
}
/**
* @return the clientName
*/
public String getClientName() {
return clientName;
}
/**
* @param clientName the clientName to set
*/
public void setClientName(String clientName) {
this.clientName = clientName;
}
/**
* @return the clientType
*/
public ClientType getClientType() {
return clientType;
}
/**
* @param clientType the clientType to set
*/
public void setClientType(ClientType clientType) {
this.clientType = clientType;
}
/**
* @return the clientTypeId
*/
public String getClientTypeId() {
return clientTypeId;
}
/**
* @param clientTypeId the clientTypeId to set
*/
public void setClientTypeId(String clientTypeId) {
this.clientTypeId = clientTypeId;
}
/**
* @return the createDate
*/
public String getCreateDate() {
return createDate;
}
/**
* @param createDate the createDate to set
*/
public void setCreateDate(String createDate) {
this.createDate = createDate;
}
/**
* @return the email
*/
public String getEmail() {
return email;
}
/**
* @param email the email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
* @return the employee
*/
public Employee getEmployee() {
return employee;
}
/**
* @param employee the employee to set
*/
public void setEmployee(Employee employee) {
this.employee = employee;
}
/**
* @return the employeeId
*/
public String getEmployeeId() {
return employeeId;
}
/**
* @param employeeId the employeeId to set
*/
public void setEmployeeId(String employeeId) {
this.employeeId = employeeId;
}
/**
* @return the fax
*/
public String getFax() {
return fax;
}
/**
* @param fax the fax to set
*/
public void setFax(String fax) {
this.fax = fax;
}
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the origin
*/
public String getOrigin() {
return origin;
}
/**
* @param origin the origin to set
*/
public void setOrigin(String origin) {
this.origin = origin;
}
/**
* @return the postCard
*/
public String getPostCard() {
return postCard;
}
/**
* @param postCard the postCard to set
*/
public void setPostCard(String postCard) {
this.postCard = postCard;
}
/**
* @return the remark
*/
public String getRemark() {
return remark;
}
/**
* @param remark the remark to set
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* @return the telephone
*/
public String getTelephone() {
return telephone;
}
/**
* @param telephone the telephone to set
*/
public void setTelephone(String telephone) {
this.telephone = telephone;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -