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

📄 shippingaddressform.java

📁 噶额外噶外骨骼感广泛高热感 就 啊啊
💻 JAVA
字号:
/*
 * @author                        : Neelesh
 * @Version                       : 1.0
 *
 * Development Environment        : Oracle9i JDeveloper
 * Name of the File               : ShippingAddressForm.java
 * Creation/Modification History  :
 *
 * Neelesh   14-March-2003      Created
 *
 */
package oracle.otnsamples.vsm.actions.forms;

import oracle.otnsamples.vsm.services.data.Address;

import org.apache.struts.action.ActionForm;


/**
 * The class is a Struts action form  encapsulating shipping address. This is
 * used in changeShippingAddress.jsp and ChangeShippingAddressAction.java The
 * class has getters and setters for address, state, city, zip, phone, country.
 * 
 * @author Neelesh
 * @version 1.0
 */

public class ShippingAddressForm extends ActionForm {

  private String address;
  private String city;
  private String country;
  private String phone;
  private String state;
  private String zip;

  /**
   * Creates a new ShippingAddressForm object.
   */
  public ShippingAddressForm() {
  }

  /**
   * Constructor which takes an Address object and copies 
   * the values from the object.
   *
   * @param <b>address</b> Address object
   */
  public ShippingAddressForm(Address address) {
    this.address = address.getAddress();
    city         = address.getCity();
    state        = address.getState();
    country      = address.getCountry();
    zip          = String.valueOf(address.getZip());
    phone        = address.getPhone();
  }

  /**
   * Set of getter methods for address, city, 
   * state, phone, country and zip 
   */
  public String getAddress() {
    return address;
  }

  public String getCity() {
    return city;
  }

  public String getState() {
    return state;
  }

  public String getPhone() {
    return phone;
  }

  public String getCountry() {
    return country;
  }

  public String getZip() {
    return zip;
  }

  public int getZipAsInteger() {
    return Integer.parseInt(zip);
  }


  /**
   * Set of setter methods for address, city, 
   * state, phone, country and zip 
   */
  public void setAddress(String value) {
    address = value;
  }

  public void setCity(String value) {
    city = value;
  }

  public void setState(String value) {
    state = value;
  }

  public void setPhone(String value) {
    phone = value;
  }

  public void setCountry(String value) {
    country = value;
  }

  public void setZip(String value) {
    zip = value;
  }
}

⌨️ 快捷键说明

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