
Untitled
By: a guest on
May 1st, 2012 | syntax:
Java | size: 0.46 KB | hits: 18 | expires: Never
//Patient (1) <-----> (1) Aufenthalt
//Klasse Patient
public void removeAufenthalt(Aufenthalt auf) {
if(aufenthalt.contains(auf)) {
aufenthalt.remove(auf);
auf.SetPatient(null);
}
}
//Klasse Aufenthalt
public void SetPatient (Patient pat) {
if(this.patient != pat) {
Patient pre = this.patient;
this.patient = null;
if(pre != null) {
pre.removeAufenthalt(this);
}
if(pat != null) {
//pat.addAufenthalt(this);
}
}
}