FileDocCategorySizeDatePackage
Person.javaAPI DocExample5625Sun Dec 14 22:47:36 GMT 2003oreilly.hcj.bankdata

Person

public class Person extends oreilly.hcj.datamodeling.MutableObject
Base encapsulates a person in the system.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.5 $

Fields Summary
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
GENDER_CONSTRAINT
Constraint for the property gender.
public static final oreilly.hcj.datamodeling.constraints.StringConstraint
FIRST_NAME_CONSTRAINT
Constraint for the property firstName.
public static final oreilly.hcj.datamodeling.constraints.StringConstraint
LAST_NAME_CONSTRAINT
Constraint for the property lastName.
public static final oreilly.hcj.datamodeling.constraints.DateConstraint
BIRTH_DATE_CONSTRAINT
Constraint for the property birthDate.
public static final oreilly.hcj.datamodeling.constraints.StringConstraint
TAX_ID_CONSTRAINT
Constraint for the property taxID.
private Date
birthDate
The birth date of the person.
private Gender
gender
The gender for the person.
private String
firstName
The first name of the person.
private String
lastName
The last name of the person.
private String
taxID
The tax ID of the person.
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object obj)

see
java.lang.Object#equals(java.lang.Object)

		if (!(obj instanceof Person)) {
			return false;
		} else {
			final Person target = (Person)obj;
			if (!target.lastName.equals(this.lastName)) {
				return false;
			}
			if (!target.firstName.equals(this.firstName)) {
				return false;
			}
			if (!target.birthDate.equals(this.birthDate)) {
				return false;
			}
			if (!target.taxID.equals(this.taxID)) {
				return false;
			}
			return true;
		}
	
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 GendergetGender()
Getter for property gender.

return
Value of property gender.

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

return
Value of property lastName.

		return lastName;
	
public java.lang.StringgetTaxID()
Getter for property taxId.

return
Value of property taxId.

		return taxID;
	
public inthashCode()

see
java.lang.Object#hashCode()

		final String hashString =
			lastName + ", " + firstName + " (" + birthDate + ") [" + taxID + "]";
		return hashString.hashCode();
	
public voidsetBirthDate(java.util.Date birthDate)
Setter for property birthDate.

param
birthDate New value of property birthDate.


	            	 
	     
		BIRTH_DATE_CONSTRAINT.validate(birthDate);
		final Date oldBirthDate = this.birthDate;
		this.birthDate = birthDate;
		propertyChangeSupport.firePropertyChange("birthDate", oldBirthDate, this.birthDate);
	
public voidsetFirstName(java.lang.String firstName)
Setter for property firstName.

param
firstName New value of property firstName.

		FIRST_NAME_CONSTRAINT.validate(firstName);
		final String oldFirstName = this.firstName;
		this.firstName = firstName;
		propertyChangeSupport.firePropertyChange("firstName", oldFirstName, this.firstName);
	
public voidsetGender(Gender gender)
Setter for property gender.

param
gender New value of property gender.

		GENDER_CONSTRAINT.validate(gender);
		final Gender oldGender = this.gender;
		this.gender = gender;
		propertyChangeSupport.firePropertyChange("gender", oldGender, this.gender);
	
public voidsetLastName(java.lang.String lastName)
Setter for property lastName.

param
lastName New value of property lastName.

		LAST_NAME_CONSTRAINT.validate(lastName);
		final String oldLastName = this.lastName;
		this.lastName = lastName;
		propertyChangeSupport.firePropertyChange("lastName", oldLastName, this.lastName);
	
public voidsetTaxID(java.lang.String taxID)
Setter for property taxId.

param
taxID New value of property taxId.

		LAST_NAME_CONSTRAINT.validate(taxID);
		final String oldTaxID = this.taxID;
		this.taxID = taxID;
		propertyChangeSupport.firePropertyChange("taxID", oldTaxID, this.taxID);