KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > lazyonetoone > Employment


1 //$Id: Employment.java,v 1.2 2005/02/12 07:27:27 steveebersole Exp $
2
package org.hibernate.test.lazyonetoone;
3
4 import java.io.Serializable JavaDoc;
5 import java.util.Date JavaDoc;
6
7 /**
8  * @author Gavin King
9  */

10 public class Employment implements Serializable JavaDoc {
11     private String JavaDoc personName;
12     private String JavaDoc organizationName;
13     private Date JavaDoc startDate;
14     private Date JavaDoc endDate;
15     Employment() {}
16     public Employment(Employee e, String JavaDoc org) {
17         this.personName = e.getPersonName();
18         this.organizationName = org;
19         startDate = new Date JavaDoc();
20         e.getEmployments().add(this);
21     }
22     public String JavaDoc getOrganizationName() {
23         return organizationName;
24     }
25     public void setOrganizationName(String JavaDoc organizationName) {
26         this.organizationName = organizationName;
27     }
28     public String JavaDoc getPersonName() {
29         return personName;
30     }
31     public void setPersonName(String JavaDoc personName) {
32         this.personName = personName;
33     }
34     public Date JavaDoc getEndDate() {
35         return endDate;
36     }
37     public void setEndDate(Date JavaDoc endDate) {
38         this.endDate = endDate;
39     }
40     public Date JavaDoc getStartDate() {
41         return startDate;
42     }
43     public void setStartDate(Date JavaDoc startDate) {
44         this.startDate = startDate;
45     }
46 }
47
Popular Tags