示例#1
0
 public void removeManagedEmployee(Employee employee) {
   getManagedEmployees().remove(employee);
   employee.setManager(null);
 }
示例#2
0
 public void addManagedEmployee(int index, Employee employee) {
   getManagedEmployees().add(index, employee);
   employee.setManager(this);
 }
示例#3
0
 public Employee setManagedEmployee(int index, Employee employee) {
   Employee removedEmp = getManagedEmployees().set(index, employee);
   removedEmp.setManager(null);
   employee.setManager(this);
   return removedEmp;
 }
示例#4
0
 /**
  * For bi-directional relationships, it is important to maintain both sides of the relationship
  * when changing it.
  */
 public void addManagedEmployee(Employee employee) {
   getManagedEmployees().add(employee);
   employee.setManager(this);
 }