Exemplo n.º 1
0
 public void removeManagedEmployee(Employee employee) {
   getManagedEmployees().remove(employee);
   employee.setManager(null);
 }
Exemplo n.º 2
0
 public void addManagedEmployee(int index, Employee employee) {
   getManagedEmployees().add(index, employee);
   employee.setManager(this);
 }
Exemplo n.º 3
0
 public Employee setManagedEmployee(int index, Employee employee) {
   Employee removedEmp = getManagedEmployees().set(index, employee);
   removedEmp.setManager(null);
   employee.setManager(this);
   return removedEmp;
 }
Exemplo n.º 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);
 }