com.san.strutsAjax.forms.CustomerForm(Form 类)
/**
* Created by Struts Assistant.
* Date: 08.04.2006 Time: 08:38:52
*/
package com.san.strutsAjax.forms;
import org.apache.struts.action.*;
import javax.servlet.http.HttpServletRequest;
public class CustomerForm extends ActionForm {
public void reset(ActionMapping actionMapping, HttpServletRequest request) {
super.reset(actionMapping, request);
}
private int id;
private String name;
private int age;
private int telephone;
private String address;
private int postcode;
private String buttonName;
public int getTelephone() {
return telephone;
}
public void setTelephone(int telephone) {
this.telephone = telephone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getPostcode() {
return postcode;
}
public void setPostcode(int postcode) {
this.postcode = postcode;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getButtonName() {
return buttonName;
}
public void setButtonName(String buttonName) {
this.buttonName = buttonName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
/**
* Returns a string representation of the object. In general, the
* <code>toString</code> method returns a string that
* "textually represents" this object. The result should
* be a concise but informative representation that is easy for a
* person to read.
* It is recommended that all subclasses override this method.
* <p/>
* The <code>toString</code> method for class <code>Object</code>
* returns a string consisting of the name of the class of which the
* object is an instance, the at-sign character `<code>@</code>‘, and
* the unsigned hexadecimal representation of the hash code of the
* object. In other words, this method returns a string equal to the
* value of:
* <blockquote>
* <pre>
* getClass().getName() + ‘@‘ + Integer.toHexString(hashCode())
* </pre></blockquote>
*
* @return a string representation of the object.
*/
@Override
public String toString() {
return new StringBuffer()
.append("ID: " + getId())
.append("NAME: " + getName())
.append("age: " + getAge())
.append("telephone: " + getTelephone())
.append("address: " + getAddress())
.append("postcode: " + getPostcode())
.toString();
}
}