FileDocCategorySizeDatePackage
Customer.javaAPI DocGlassfish v2 API7047Sat May 05 19:17:10 BST 2007org.apache.taglibs.standard.examples.beans

Customer

public class Customer extends Object
Object that represents a Customer.
author
Pierre Delisle
version
$Revision: 1.3 $ $Date: 2007/05/06 02:17:10 $

Fields Summary
int
key
Holds value of property key.
private String
lastName
Holds value of property lastName.
private String
firstName
Holds value of property firstName.
private Date
birthDate
Holds value of property birthDate.
private Address
address
Holds value of property address.
private String
phoneHome
Holds value of property phoneHome.
private String
phoneCell
Holds value of property phoneCell.
static DateFormat
df
Constructors Summary
public Customer()

    
    //*********************************************************************
    // Constructors
    
      
public Customer(int key, String lastName, String firstName, Date birthDate, Address address, String phoneHome, String phoneCell)

        init(key, lastName, firstName, birthDate, address, phoneHome, phoneCell);
    
Methods Summary
public AddressgetAddress()
Getter for property address.

return
Value of property address.

        return address;
    
public java.util.DategetBirthDate()
Getter for property birthDate.

return
Value of property birthDate.

        return birthDate;
    
public java.lang.StringgetFirstName()
Getter for property firstName.

return
Value of property firstName.

        return firstName;
    
public intgetKey()
Getter for property key.

return
Value of property key.

        return key;
    
public java.lang.StringgetLastName()
Getter for property lastName.

return
Value of property lastName.

        return lastName;
    
public java.lang.StringgetPhoneCell()
Getter for property phoneCell.

return
Value of property phoneCell.

        return phoneCell;
    
public java.lang.StringgetPhoneHome()
Getter for property phoneHome.

return
Value of property phoneHome.

        return phoneHome;
    
public voidinit(int key, java.lang.String lastName, java.lang.String firstName, java.util.Date birthDate, Address address, java.lang.String phoneHome, java.lang.String phoneCell)

        setKey(key);
        setLastName(lastName);
        setFirstName(firstName);
        setBirthDate(birthDate);
        setAddress(address);
        setPhoneHome(phoneHome);
        setPhoneCell(phoneCell);
    
public voidsetAddress(Address address)
Setter for property address.

param
address New value of property address.

        this.address = address;
    
public voidsetBirthDate(java.util.Date birthDate)
Setter for property birthDate.

param
birthDate New value of property birthDate.

        this.birthDate = birthDate;
    
public voidsetFirstName(java.lang.String firstName)
Setter for property firstName.

param
firstName New value of property firstName.

        this.firstName = firstName;
    
public voidsetKey(int key)
Setter for property key.

param
key New value of property key.

        this.key = key;
    
public voidsetLastName(java.lang.String lastName)
Setter for property lastName.

param
lastName New value of property lastName.

        this.lastName = lastName;
    
public voidsetPhoneCell(java.lang.String phoneCell)
Setter for property phoneCell.

param
phoneCell New value of property phoneCell.

        this.phoneCell = phoneCell;
    
public voidsetPhoneHome(java.lang.String phoneHome)
Setter for property phoneHome.

param
phoneHome New value of property phoneHome.

        this.phoneHome = phoneHome;
    
public java.lang.StringtoString()
Return a String representation of this object.

        StringBuffer sb = new StringBuffer();
        sb.append("[").append(key).append("] ");
        sb.append(getLastName()).append(", ");
        sb.append(getFirstName()).append("  ");
        sb.append(df.format(getBirthDate())).append("  ");
        sb.append(getAddress()).append("  ");
        if(getPhoneHome() != null) sb.append(getPhoneHome()).append("  ");
        if(getPhoneCell() != null) sb.append(getPhoneCell());
        return (sb.toString());