KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Employment.java,v 1.7 2005/04/06 16:43:09 maxcsaucdk Exp $
2
package org.hibernate.test.sql;
3
4 import java.util.Date JavaDoc;
5
6 /**
7  * @author Gavin King
8  */

9 public class Employment {
10     private long employmentId;
11     private Person employee;
12     private Organization employer;
13     private Date JavaDoc startDate;
14     private Date JavaDoc endDate;
15     private String JavaDoc regionCode;
16     private MonetaryAmount salary;
17     
18     public Employment() {}
19
20     public Employment(Person employee, Organization employer, String JavaDoc regionCode) {
21         this.employee = employee;
22         this.employer = employer;
23         this.startDate = new Date JavaDoc();
24         this.regionCode = regionCode;
25         employer.getEmployments().add(this);
26     }
27     /**
28      * @return Returns the employee.
29      */

30     public Person getEmployee() {
31         return employee;
32     }
33     /**
34      * @param employee The employee to set.
35      */

36     public void setEmployee(Person employee) {
37         this.employee = employee;
38     }
39     /**
40      * @return Returns the employer.
41      */

42     public Organization getEmployer() {
43         return employer;
44     }
45     /**
46      * @param employer The employer to set.
47      */

48     public void setEmployer(Organization employer) {
49         this.employer = employer;
50     }
51     /**
52      * @return Returns the endDate.
53      */

54     public Date JavaDoc getEndDate() {
55         return endDate;
56     }
57     /**
58      * @param endDate The endDate to set.
59      */

60     public void setEndDate(Date JavaDoc endDate) {
61         this.endDate = endDate;
62     }
63     /**
64      * @return Returns the id.
65      */

66     public long getEmploymentId() {
67         return employmentId;
68     }
69     /**
70      * @param id The id to set.
71      */

72     public void setEmploymentId(long id) {
73         this.employmentId = id;
74     }
75     /**
76      * @return Returns the startDate.
77      */

78     public Date JavaDoc getStartDate() {
79         return startDate;
80     }
81     /**
82      * @param startDate The startDate to set.
83      */

84     public void setStartDate(Date JavaDoc startDate) {
85         this.startDate = startDate;
86     }
87     /**
88      * @return Returns the regionCode.
89      */

90     public String JavaDoc getRegionCode() {
91         return regionCode;
92     }
93     /**
94      * @param regionCode The regionCode to set.
95      */

96     public void setRegionCode(String JavaDoc regionCode) {
97         this.regionCode = regionCode;
98     }
99     
100     public MonetaryAmount getSalary() {
101         return salary;
102     }
103     
104     public void setSalary(MonetaryAmount salary) {
105         this.salary = salary;
106     }
107 }
108
Popular Tags