org.springframework.richclient.samples.simple.domain
Class Contact

java.lang.Object
  extended by org.springframework.richclient.samples.simple.domain.Contact

public class Contact
extends Object

This class provides a trivial domain object for the sample application. It represents a simple Contact entry in a personal address book. It is not very useful in that it only allows a single address for an individual and it doesn't support arbitrary contact data, just predefined fields. However, since we're not going into the Address Book business, this will suffice for demonstration purposes in this sample application.

This class makes use of one subordinate (or nested) object in order to show how nested property paths can be used in forms. It doesn't really serve any other great design need.

The validation rules for this class are provided externally, by SimpleValidationRulesSource. This configuration is often required when you don't have any mechanism to extend the domain object directly, or for other design reasons, don't want to include the validation rules directly in the domain object implementation.

Author:
Larry Streepy
See Also:
SimpleValidationRulesSource

Constructor Summary
Contact()
          Default constructor.
 
Method Summary
 boolean equals(Object o)
          Compare two objects for equality.
 Address getAddress()
           
 ContactType getContactType()
           
 Date getDateOfBirth()
           
 String getEmailAddress()
           
 String getFirstName()
           
 String getHomePhone()
           
 int getId()
           
 String getLastName()
           
 String getMiddleName()
           
 String getWorkPhone()
           
 int hashCode()
          Hashcode.
 void setAddress(Address address)
           
 void setContactType(ContactType contactType)
           
 void setDateOfBirth(Date dateOfBirth)
           
 void setEmailAddress(String emailAddress)
           
 void setFirstName(String firstName)
           
 void setHomePhone(String homePhone)
           
 void setId(int id)
           
 void setLastName(String lastName)
           
 void setMiddleName(String middleName)
           
 void setWorkPhone(String workPhone)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contact

public Contact()
Default constructor.

Method Detail

getId

public int getId()
Returns:
the id

setId

public void setId(int id)
Parameters:
id - the id to set

getAddress

public Address getAddress()
Returns:
the address

setAddress

public void setAddress(Address address)
Parameters:
address - the address to set

getDateOfBirth

public Date getDateOfBirth()
Returns:
the dateOfBirth

setDateOfBirth

public void setDateOfBirth(Date dateOfBirth)
Parameters:
dateOfBirth - the dateOfBirth to set

getEmailAddress

public String getEmailAddress()
Returns:
the emailAddress

setEmailAddress

public void setEmailAddress(String emailAddress)
Parameters:
emailAddress - the emailAddress to set

getFirstName

public String getFirstName()
Returns:
the firstName

setFirstName

public void setFirstName(String firstName)
Parameters:
firstName - the firstName to set

getHomePhone

public String getHomePhone()
Returns:
the homePhone

setHomePhone

public void setHomePhone(String homePhone)
Parameters:
homePhone - the homePhone to set

getLastName

public String getLastName()
Returns:
the lastName

setLastName

public void setLastName(String lastName)
Parameters:
lastName - the lastName to set

getMiddleName

public String getMiddleName()
Returns:
the middleName

setMiddleName

public void setMiddleName(String middleName)
Parameters:
middleName - the middleName to set

getWorkPhone

public String getWorkPhone()
Returns:
the workPhone

setWorkPhone

public void setWorkPhone(String workPhone)
Parameters:
workPhone - the workPhone to set

getContactType

public ContactType getContactType()
Returns:
the contactType

setContactType

public void setContactType(ContactType contactType)
Parameters:
contactType - the contactType to set

equals

public boolean equals(Object o)
Compare two objects for equality. Just test their ids.

Overrides:
equals in class Object
Parameters:
o - object to compare

hashCode

public int hashCode()
Hashcode.

Overrides:
hashCode in class Object


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.