FileDocCategorySizeDatePackage
LoanAccount.javaAPI DocExample5789Sun Dec 14 22:47:38 GMT 2003oreilly.hcj.bankdata

LoanAccount

public class LoanAccount extends LiabilityAccount
An account representing a principal loan to a customer.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.3 $

Fields Summary
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
PAYMENT_CONSTRAINT
Constraint for the property payment.
public static final oreilly.hcj.datamodeling.constraints.NumericConstraint
INTEREST_PAID_CONSTRAINT
Constraint for the property interestPaid.
public static final oreilly.hcj.datamodeling.constraints.NumericConstraint
ORIGINAL_PRINCIPAL_CONSTRAINT
Constraint for the property originalPrincipal.
public static final oreilly.hcj.datamodeling.constraints.NumericConstraint
AMOUNT_CONSTRAINT
Constraint for the property amount.
public static final oreilly.hcj.datamodeling.constraints.NumericConstraint
DURATION_CONSTRAINT
Constraint for the property duration.
public static final oreilly.hcj.datamodeling.constraints.ObjectConstraint
APPLICATION_CONSTRAINT
Constraint for the property application.
private AutomaticPayment
payment
The monthly payment instance for this loan.
private Float
interestPaid
The interest that the customer has paid on this loan for the life of the loan.
private Float
originalPrincipal
The original principal borrowed on the loan.
private Integer
duration
The duration of the loan in months.
private LoanApplication
application
The application that resulted in this account.
Constructors Summary
Methods Summary
public LoanApplicationgetApplication()
Getter for property application.

return
Value of property application.

		return application;
	
public java.lang.IntegergetDuration()
Getter for property duration.

return
Value of property duration.

		return duration;
	
public java.lang.FloatgetInterestPaid()
Getter for property interestPaid.

return
Value of property interestPaid.

		return interestPaid;
	
public java.lang.FloatgetOriginalPrincipal()
Getter for property originalPrincipal.

return
Value of property originalPrincipal.

		return originalPrincipal;
	
public AutomaticPaymentgetPayment()
Getter for property payment.

return
Value of property payment.

		return payment;
	
public voidsetApplication(LoanApplication application)
Setter for property application.

param
application New value of property application.


	            	 
	     
		APPLICATION_CONSTRAINT.validate(application);
		final LoanApplication oldApplication = this.application;
		this.application = application;
		propertyChangeSupport.firePropertyChange("application", oldApplication,
		                                         this.application);
	
public voidsetDuration(java.lang.Integer duration)
Setter for property duration.

param
duration New value of property duration.

		DURATION_CONSTRAINT.validate(duration);
		final Integer oldDuration = this.duration;
		this.duration = duration;
		propertyChangeSupport.firePropertyChange("duration", oldDuration, this.duration);
	
public voidsetInterestPaid(java.lang.Float interestPaid)
Setter for property interestPaid.

param
interestPaid New value of property interestPaid.

		INTEREST_PAID_CONSTRAINT.validate(interestPaid);
		final Float oldInterestPaid = this.interestPaid;
		this.interestPaid = interestPaid;
		propertyChangeSupport.firePropertyChange("interestPaid", oldInterestPaid,
		                                         this.interestPaid);
	
public voidsetOriginalPrincipal(java.lang.Float originalPrincipal)
Setter for property originalPrincipal.

param
originalPrincipal New value of property originalPrincipal.

		ORIGINAL_PRINCIPAL_CONSTRAINT.validate(originalPrincipal);
		final Float oldOriginalPrincipal = this.originalPrincipal;
		this.originalPrincipal = originalPrincipal;
		propertyChangeSupport.firePropertyChange("originalPrincipal",
		                                         oldOriginalPrincipal,
		                                         this.originalPrincipal);
	
public voidsetPayment(AutomaticPayment payment)
Setter for property payment.

param
payment New value of property payment.

		PAYMENT_CONSTRAINT.validate(payment);
		final AutomaticPayment oldPayment = this.payment;
		this.payment = payment;
		propertyChangeSupport.firePropertyChange("payment", oldPayment, this.payment);