Пример #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);
 }