@@ -0,0 +1,1515 @@
+import java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport javax.persistence.CascadeType;%0Aimport javax.persistence.Column;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.GeneratedValue;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.OneToMany;%0A%0A@Entity%0Apublic class Department %7B%0A%09private Integer id;%0A%09private String name;%0A%09private Set%3CEmployee%3E employees = new HashSet%3CEmployee%3E();%0A%09%0A%09public Department()%7B%7D%0A%09%0A%09public Department(Integer id)%7Bthis.id = id;%7D%0A%09%0A%09public Department(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%09%0A%09@OneToMany(mappedBy=%22department%22,cascade=CascadeType.REFRESH)%0A%09public Set%3CEmployee%3E getEmployees() %7B%0A%09%09return employees;%0A%09%7D%0A%0A%09public void setEmployees(Set%3CEmployee%3E employees) %7B%0A%09%09this.employees = employees;%0A%09%7D%0A%0A%09@Id @GeneratedValue%0A%09public Integer getId() %7B%0A%09%09return id;%0A%09%7D%0A%09public void setId(Integer id) %7B%0A%09%09this.id = id;%0A%09%7D%0A%09@Column(length=20, nullable=false)%0A%09public String getName() %7B%0A%09%09return name;%0A%09%7D%0A%09public void setName(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result + ((id == null) ? 0 : id.hashCode());%0A%09%09return result;%0A%09%7D%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09if (this == obj)%0A%09%09%09return true;%0A%09%09if (obj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A%09%09final Department other = (Department) obj;%0A%09%09if (id == null) %7B%0A%09%09%09if (other.id != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!id.equals(other.id))%0A%09%09%09return false;%0A%09%09return true;%0A%09%7D%0A%09%0A%7D%0A

Create DEpartment.java