public void removeManagedEmployee(Employee employee) { getManagedEmployees().remove(employee); employee.setManager(null); }
public void addManagedEmployee(int index, Employee employee) { getManagedEmployees().add(index, employee); employee.setManager(this); }
public Employee setManagedEmployee(int index, Employee employee) { Employee removedEmp = getManagedEmployees().set(index, employee); removedEmp.setManager(null); employee.setManager(this); return removedEmp; }
/** * 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); }