1 package org.hibernate.test.sql; 3 4 import java.util.Date ; 5 6 9 public class Employment { 10 private long employmentId; 11 private Person employee; 12 private Organization employer; 13 private Date startDate; 14 private Date endDate; 15 private String regionCode; 16 private MonetaryAmount salary; 17 18 public Employment() {} 19 20 public Employment(Person employee, Organization employer, String regionCode) { 21 this.employee = employee; 22 this.employer = employer; 23 this.startDate = new Date (); 24 this.regionCode = regionCode; 25 employer.getEmployments().add(this); 26 } 27 30 public Person getEmployee() { 31 return employee; 32 } 33 36 public void setEmployee(Person employee) { 37 this.employee = employee; 38 } 39 42 public Organization getEmployer() { 43 return employer; 44 } 45 48 public void setEmployer(Organization employer) { 49 this.employer = employer; 50 } 51 54 public Date getEndDate() { 55 return endDate; 56 } 57 60 public void setEndDate(Date endDate) { 61 this.endDate = endDate; 62 } 63 66 public long getEmploymentId() { 67 return employmentId; 68 } 69 72 public void setEmploymentId(long id) { 73 this.employmentId = id; 74 } 75 78 public Date getStartDate() { 79 return startDate; 80 } 81 84 public void setStartDate(Date startDate) { 85 this.startDate = startDate; 86 } 87 90 public String getRegionCode() { 91 return regionCode; 92 } 93 96 public void setRegionCode(String 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 |