Package ejava.examples.orm.rel.annotated
Class Borrower
- java.lang.Object
- 
- ejava.examples.orm.rel.annotated.Borrower
 
- 
 @Entity public class Borrower extends Object This class forms a uni-directional, one-to-one relationship with the Person class, joined by common primary keys. There is not additional column necessary to store the foreign key. Note too that this object fully encapsulates the relationship by never handing over the Person; only using it to derive values. All concenience getters are declared Transient.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCheckout(Checkout checkout)ApplicantgetApplication()Collection<Checkout>getCheckouts()DategetEndDate()longgetId()StringgetName()This method returns the concatenated first/last names of the Borrower's person.DategetStartDate()private StringmyInstance()voidremoveCheckout(Checkout checkout)voidsetApplication(Applicant application)voidsetEndDate(Date end)voidsetStartDate(Date start)StringtoString()
 
- 
- 
- 
Constructor Detail- 
Borrowerprotected Borrower() 
 - 
Borrowerpublic Borrower(Person identity) 
 
- 
 - 
Method Detail- 
getIdpublic long getId() 
 - 
getEndDatepublic Date getEndDate() 
 - 
setEndDatepublic void setEndDate(Date end) 
 - 
getStartDatepublic Date getStartDate() 
 - 
setStartDatepublic void setStartDate(Date start) 
 - 
getNamepublic String getName() This method returns the concatenated first/last names of the Borrower's person. Note that we need to declare this field Transient so that the provider doesn't try to map this to a column in the Borrower table as well as look for a setName.
 - 
getApplicationpublic Applicant getApplication() 
 - 
setApplicationpublic void setApplication(Applicant application) 
 - 
getCheckoutspublic Collection<Checkout> getCheckouts() 
 - 
addCheckoutpublic void addCheckout(Checkout checkout) 
 - 
removeCheckoutpublic void removeCheckout(Checkout checkout) 
 - 
myInstanceprivate String myInstance() 
 
- 
 
-