FileDocCategorySizeDatePackage
AutomaticPayment.javaAPI DocExample4474Sun Dec 14 22:47:30 GMT 2003oreilly.hcj.bankdata

AutomaticPayment

public class AutomaticPayment extends oreilly.hcj.datamodeling.MutableObject
Describes monthly payments that are automatically taken from one customer and credited to another customer.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.4 $

Fields Summary
public static final oreilly.hcj.datamodeling.constraints.StringConstraint
PAYMENT_CODE_CONSTRAINT
Constraint for the property code.
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
PAYEE_CONSTRAINT
Constraint for the property payee .
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
PAYER_CONSTRAINT
Constraint for the property payer.
public static final oreilly.hcj.datamodeling.constraints.NumericConstraint
AMOUNT_CONSTRAINT
Constraint for the property amount.
private Customer
payee
The customer to be paid.
private Customer
payer
The customer making the payment.
private Float
amount
The amount to be paid
private String
paymentCode
Holds value of property paymentCode.
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object obj)

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

		if (!(obj instanceof AutomaticPayment)) {
			return false;
		} else {
			return (((AutomaticPayment)obj).getPaymentCode().equals(this.paymentCode));
		}
	
public java.lang.FloatgetAmount()
Getter for property amount.

return
Value of property amount.

		return amount;
	
public CustomergetPayee()
Getter for property payee.

return
Value of property payee.

		return payee;
	
public CustomergetPayer()
Getter for property payer.

return
Value of property payer.

		return payer;
	
public java.lang.StringgetPaymentCode()
Getter for property paymentCode.

return
Value of property paymentCode.

		return this.paymentCode;
	
public inthashCode()

see
java.lang.Object#hashCode()

		return this.paymentCode.hashCode();
	
public voidsetAmount(java.lang.Float amount)
Setter for property amount.

param
amount New value of property amount.


	            	 
	     
		AMOUNT_CONSTRAINT.validate(amount);
		final Float oldAmount = this.amount;
		this.amount = amount;
		propertyChangeSupport.firePropertyChange("amount", oldAmount, this.amount);
	
public voidsetPayee(Customer payee)
Setter for property payee.

param
payee New value of property payee.

		PAYEE_CONSTRAINT.validate(payee);
		final Customer oldPayee = this.payee;
		this.payee = payee;
		propertyChangeSupport.firePropertyChange("payee", oldPayee, this.payee);
	
public voidsetPayer(Customer payer)
Setter for property payer.

param
payer New value of property payer.

		PAYER_CONSTRAINT.validate(payer);
		final Customer oldPayer = this.payer;
		this.payer = payer;
		propertyChangeSupport.firePropertyChange("payer", oldPayer, this.payer);
	
public voidsetPaymentCode(java.lang.String paymentCode)
Setter for property paymentCode.

param
paymentCode New value of property paymentCode.

		PAYMENT_CODE_CONSTRAINT.validate(paymentCode);
		final String oldPaymentCode = this.paymentCode;
		this.paymentCode = paymentCode;
		propertyChangeSupport.firePropertyChange("paymentCode", oldPaymentCode,
		                                         paymentCode);