⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customerform.java

📁 由于跟踪客户的购物意向
💻 JAVA
字号:
package com.relationinfo.customertrace.struts.forms;

import java.text.DateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.Action.*;
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.action.ActionErrors;


public class CustomerForm extends ActionForm
{
	private String customercode;

	private String customertypecode;

	private String customername;

	private String address;

	private String phone;

	private String mobile;

	private String email;

	private String birthday;

	private String hobby;

	private String note;

	private String crudMethod;

	/** 
	 * 设置 customercode
	 */
	public void setCustomercode(String customercode)
	{
		this.customercode = customercode;
	}

	/** 
	 * 获得 customercode
	 */
	public String getCustomercode()
	{
		return customercode;
	}

	/** 
	 * 设置 customertypecode
	 */
	public void setCustomertypecode(String customertypecode)
	{
		this.customertypecode = customertypecode;
	}

	/** 
	 * 获得 customertypecode
	 */
	public String getCustomertypecode()
	{
		return customertypecode;
	}

	/** 
	 * 设置 customername
	 */
	public void setCustomername(String customername)
	{
		this.customername = customername;
	}

	/** 
	 * 获得 customername
	 */
	public String getCustomername()
	{
		return customername;
	}

	/** 
	 * 设置 address
	 */
	public void setAddress(String address)
	{
		this.address = address;
	}

	/** 
	 * 获得 address
	 */
	public String getAddress()
	{
		return address;
	}

	/** 
	 * 设置 phone
	 */
	public void setPhone(String phone)
	{
		this.phone = phone;
	}

	/** 
	 * 获得 phone
	 */
	public String getPhone()
	{
		return phone;
	}

	/** 
	 * 设置 mobile
	 */
	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}

	/** 
	 * 获得 mobile
	 */
	public String getMobile()
	{
		return mobile;
	}

	/** 
	 * 设置 email
	 */
	public void setEmail(String email)
	{
		this.email = email;
	}

	/** 
	 * 获得 email
	 */
	public String getEmail()
	{
		return email;
	}

	/** 
	 * 设置 birthday
	 */
	public void setBirthday(String birthday)
	{
		this.birthday = birthday;
	}

	/** 
	 * 获得 birthday
	 */
	public String getBirthday()
	{
		return birthday;
	}

	/** 
	 * 设置 hobby
	 */
	public void setHobby(String hobby)
	{
		this.hobby = hobby;
	}

	/** 
	 * 获得 hobby
	 */
	public String getHobby()
	{
		return hobby;
	}

	/** 
	 * 设置 note
	 */
	public void setNote(String note)
	{
		this.note = note;
	}

	/** 
	 * 获得 note
	 */
	public String getNote()
	{
		return note;
	}

	/** 
	 * 设置 crudMethod
	 */
	public void setCrudMethod(String crudMethod)
	{
		this.crudMethod = crudMethod;
	}

	/** 
	 * 获得 crudMethod
	 */
	public String getCrudMethod()
	{
		return crudMethod;
	}

	/**
	 * Method 'reset'
	 * 
	 */
	public void reset()
	{
		customercode = "";
		customertypecode = "";
		customername = "";
		address = "";
		phone = "";
		mobile = "";
		email = "";
		hobby = "";
		note = "";
	}

	/**
	 * Method 'validate'
	 * 
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
	{
		ActionErrors _errors = new ActionErrors();
		// attempt to parse birthday
		try {
			java.util.Date _parsed_birthday = birthday == null ? null : DateFormat.getDateInstance().parse( birthday);
		}
		catch (Exception e) {
			_errors.add( ActionErrors.GLOBAL_MESSAGE, new ActionMessage("internal.error", e.getMessage()) );
		}
		
		return _errors;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -