com.iternum.swlink.examples.profile
Class Person

java.lang.Object
  extended bycom.iternum.swlink.examples.profile.Person

public class Person
extends java.lang.Object

Author:
bankkar A person class to be used in the NestedProfileModel.

Field Summary
static java.lang.String DATE_OF_BIRTH
          Date of birth.
static java.lang.String FEMALE
          Property change constant.
static int FEMALE_ID
          Integer constant for gender.
static java.lang.String FIRST_NAME
          Property change constant.
static java.lang.String LAST_NAME
          Property change constant.
static java.lang.String MALE
          Property change constant.
static int MALE_ID
          Integer constant for gender.
static java.lang.String MIDDLE_NAME
          Property change constant.
static java.lang.String TITLE
          Property change constant.
 
Constructor Summary
Person()
          Create an empty person.
Person(java.lang.String pLastName, java.lang.String pFirstName, java.lang.String pMiddleName, java.lang.String pTitle, int pGender, java.util.Date pDateOfBirth)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pListener)
          Adds a PropertyChangeListener to the model.
 java.lang.Object clone()
          Clone this person.
 java.util.Date getDateOfBirth()
          Gets the date of birth.
 java.lang.String getFirstName()
           
 java.lang.String getGender()
           
 java.lang.String getLastName()
           
 java.lang.String getMiddleName()
           
 java.lang.String getTitle()
           
 boolean isFemale()
           
 boolean isMale()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener pListener)
          Remove a PropertyChangeListener from the model.
 void setDateOfBirth(java.util.Date pDate)
          Sets the date of birth.
 void setFemale(boolean pFemale)
           
 void setFirstName(java.lang.String pFirstName)
           
 void setLastName(java.lang.String pLastName)
           
 void setMale(boolean pMale)
           
 void setMiddleName(java.lang.String pMiddleName)
           
 void setTitle(java.lang.String pTitle)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST_NAME

public static final java.lang.String LAST_NAME
Property change constant.

See Also:
Constant Field Values

FIRST_NAME

public static final java.lang.String FIRST_NAME
Property change constant.

See Also:
Constant Field Values

MIDDLE_NAME

public static final java.lang.String MIDDLE_NAME
Property change constant.

See Also:
Constant Field Values

TITLE

public static final java.lang.String TITLE
Property change constant.

See Also:
Constant Field Values

MALE

public static final java.lang.String MALE
Property change constant.

See Also:
Constant Field Values

FEMALE

public static final java.lang.String FEMALE
Property change constant.

See Also:
Constant Field Values

DATE_OF_BIRTH

public static final java.lang.String DATE_OF_BIRTH
Date of birth.

See Also:
Constant Field Values

FEMALE_ID

public static final int FEMALE_ID
Integer constant for gender.

See Also:
Constant Field Values

MALE_ID

public static final int MALE_ID
Integer constant for gender.

See Also:
Constant Field Values
Constructor Detail

Person

public Person()
Create an empty person.


Person

public Person(java.lang.String pLastName,
              java.lang.String pFirstName,
              java.lang.String pMiddleName,
              java.lang.String pTitle,
              int pGender,
              java.util.Date pDateOfBirth)
Parameters:
pLastName - Person last name
pFirstName - Person first name
pMiddleName - Person middle name
pTitle - Person title
pGender - Person gender, one of "MALE","FEMALE"
pDateOfBirth - The date of birth
Method Detail

clone

public java.lang.Object clone()
Clone this person.

Returns:
A clone of this person.

getFirstName

public final java.lang.String getFirstName()
Returns:
Returns the firstName.

setFirstName

public final void setFirstName(java.lang.String pFirstName)
Parameters:
pFirstName - The firstName to set.

getGender

public final java.lang.String getGender()
Returns:
Returns the gender as a string.

getLastName

public final java.lang.String getLastName()
Returns:
Returns the lastName.

setLastName

public final void setLastName(java.lang.String pLastName)
Parameters:
pLastName - The lastName to set.

getMiddleName

public final java.lang.String getMiddleName()
Returns:
Returns the middleName.

setMiddleName

public final void setMiddleName(java.lang.String pMiddleName)
Parameters:
pMiddleName - The middleName to set.

getTitle

public final java.lang.String getTitle()
Returns:
Returns the title.

setTitle

public final void setTitle(java.lang.String pTitle)
Parameters:
pTitle - The title to set.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pListener)
Adds a PropertyChangeListener to the model.

Parameters:
pListener - The listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pListener)
Remove a PropertyChangeListener from the model.

Parameters:
pListener - The listener

isFemale

public boolean isFemale()
Returns:
Returns the female.

setFemale

public void setFemale(boolean pFemale)
Parameters:
pFemale - The female to set.

isMale

public boolean isMale()
Returns:
Returns the male.

setMale

public void setMale(boolean pMale)
Parameters:
pMale - The male to set.

getDateOfBirth

public final java.util.Date getDateOfBirth()
Gets the date of birth.

Returns:
Returns the birthdate.

setDateOfBirth

public final void setDateOfBirth(java.util.Date pDate)
Sets the date of birth.

Parameters:
pDate - The date of birth to set.