FileDocCategorySizeDatePackage
Customer.javaAPI DocExample8232Sun Dec 14 22:47:40 GMT 2003oreilly.hcj.bankdata

Customer

public class Customer extends oreilly.hcj.datamodeling.MutableObject
A customer of the bank.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.7 $

Fields Summary
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
CARD_COLOR_CONSTRAINT
Constraint for the property cardColor.
public static final oreilly.hcj.datamodeling.constraints.NumericConstraint
CUSTOMER_ID_CONSTRAINT
Constraint for the property customerID.
public static final oreilly.hcj.datamodeling.constraints.StringConstraint
EMAIL_CONSTRAINT
Constraint for the property email.
public static final oreilly.hcj.datamodeling.constraints.CollectionConstraint
ACCOUNTS_CONSTRAINT
Constraint for the property accounts.
public static final oreilly.hcj.datamodeling.constraints.CollectionConstraint
APPLICATIONS_CONSTRAINT
Constraint for the property applications.
public static final oreilly.hcj.datamodeling.constraints.CollectionConstraint
PAYMENTS_CONSTRAINT
Constraint for the property payments.
public static final oreilly.hcj.datamodeling.constraints.StringConstraint
PASS_PHRASE_CONSTRAINT
Constraint for the property email.
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
PERSON_CONSTRAINT
Constraint for the property person.
private Color
cardColor
Holds value of property cardColor.
private Integer
customerID
The ID of the customer. A 9 digit number.
private Person
person
The unique id for this employee
private Set
accounts
The accounts held by the customer.
private Set
applications
Applications for loans filed by the customer.
private Set
payments
The monthly automatic payments beign paid by the customer.
private String
email
The email address of the customer
private String
passPhrase
The pass phrase of the customer
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object obj)

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

		if (!(obj instanceof Customer)) {
			return false;
		} else {
			return (((Customer)obj).getCustomerID().equals(this.customerID));
		}
	
public java.util.SetgetAccounts()
Getter for property accounts.

return
Value of property accounts.

		return Collections.unmodifiableSet(accounts);
	
public java.util.SetgetApplications()
Getter for property applications.

return
Value of property applications.

		return Collections.unmodifiableSet(applications);
	
public java.awt.ColorgetCardColor()
Getter for property favoriteColor.

return
Value of property favoriteColor.

		return this.cardColor;
	
public java.lang.IntegergetCustomerID()
Getter for property customerID.

return
Value of property customerID.

		return customerID;
	
public java.lang.StringgetEmail()
Getter for property email.

return
Value of property email.

		return email;
	
public java.lang.StringgetPassPhrase()
Getter for property passPhrase.

return
Value of property passPhrase.

		return passPhrase;
	
public java.util.SetgetPayments()
Getter for property payments.

return
Value of property payments.

		return Collections.unmodifiableSet(payments);
	
public PersongetPerson()
Getter for property person.

return
Value of property person.

		return person;
	
public inthashCode()

see
java.lang.Object#hashCode()

		return this.customerID.hashCode();
	
public voidsetAccounts(java.util.Set accounts)
Setter for property accounts.

param
accounts New value of property accounts.


	            	 
	     
		ACCOUNTS_CONSTRAINT.validate(accounts);
		final Set oldAccounts = Collections.unmodifiableSet(this.accounts);
		this.accounts = new HashSet(accounts);
		propertyChangeSupport.firePropertyChange("accounts", oldAccounts, getAccounts());
	
public voidsetApplications(java.util.Set applications)
Setter for property applications.

param
applications New value of property applications.

		APPLICATIONS_CONSTRAINT.validate(applications);
		final Set oldApplications = Collections.unmodifiableSet(this.applications);
		this.applications = new HashSet(applications);
		propertyChangeSupport.firePropertyChange("applications", oldApplications,
		                                         getApplications());
	
public voidsetCardColor(java.awt.Color cardColor)
Setter for property favoriteColor.

param
cardColor New value of property favoriteColor.

		CARD_COLOR_CONSTRAINT.validate(cardColor);
		final Color oldCardColor = this.cardColor;
		this.cardColor = cardColor;
		propertyChangeSupport.firePropertyChange("cardColor", oldCardColor, cardColor);
	
public voidsetCustomerID(java.lang.Integer customerID)
Setter for property customerID.

param
customerID New value of property customerID.

		CUSTOMER_ID_CONSTRAINT.validate(customerID);
		final Integer oldCustomerID = this.customerID;
		this.customerID = customerID;
		propertyChangeSupport.firePropertyChange("customerID", oldCustomerID,
		                                         this.customerID);
	
public voidsetEmail(java.lang.String email)
Setter for property email.

param
email New value of property email.

		EMAIL_CONSTRAINT.validate(email);
		final String oldEmail = this.email;
		this.email = email;
		propertyChangeSupport.firePropertyChange("email", oldEmail, this.email);
	
public voidsetPassPhrase(java.lang.String passPhrase)
Setter for property passPhrase.

param
passPhrase New value of property passPhrase.

		EMAIL_CONSTRAINT.validate(passPhrase);
		final String oldPassPhrase = this.passPhrase;
		this.passPhrase = passPhrase;
		propertyChangeSupport.firePropertyChange("passPhrase", oldPassPhrase,
		                                         this.passPhrase);
	
public voidsetPayments(java.util.Set payments)
Setter for property payments.

param
payments New value of property payments.

		PAYMENTS_CONSTRAINT.validate(payments);
		final Set oldPayments = Collections.unmodifiableSet(this.payments);
		this.payments = new HashSet(payments);
		propertyChangeSupport.firePropertyChange("payments", oldPayments, getPayments());
	
public voidsetPerson(Person person)
Setter for property person.

param
person New value of property person.

		PERSON_CONSTRAINT.validate(person);
		final Person oldPerson = this.person;
		this.person = person;
		propertyChangeSupport.firePropertyChange("person", oldPerson, this.person);