public void remove() { if (owner != null) { owner.removeOwnership(this); } if (room != null) { room.removeAppointment(this); } }
public void setRoom(Room room) { Room oldRoom = this.room; this.room = room; if (oldRoom != null) { oldRoom.removeAppointment(this); } if (room != null) { room.addAppointment(this); } pcs.firePropertyChange(ROOM_PROP, oldRoom, room); }