Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: Java  |  size: 0.46 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //Patient (1) <-----> (1) Aufenthalt
  2. //Klasse Patient
  3. public void removeAufenthalt(Aufenthalt auf) {
  4.  
  5. if(aufenthalt.contains(auf))  {
  6.                 aufenthalt.remove(auf);
  7.                 auf.SetPatient(null);
  8.         }
  9. }      
  10. //Klasse Aufenthalt
  11. public void SetPatient (Patient pat) {         
  12.         if(this.patient != pat) {              
  13.                 Patient pre = this.patient;
  14.                 this.patient = null;
  15.                 if(pre != null) {
  16.                         pre.removeAufenthalt(this);
  17.                 }
  18.                 if(pat != null) {
  19.                         //pat.addAufenthalt(this);
  20.                 }
  21.         }
  22. }