public void overwrite(DBObject object) throws RemoteException
  {
    if (object == null)
      return;
    if (!object.getClass().equals(this.getClass()))
      return;

    String[] attributes = getAttributeNames();
    
    for (int i=0;i<attributes.length;++i)
    {
      Class foreign = getForeignObject(attributes[i]);
      if (foreign != null)
      {
        // Fremdschluessel. Also ID holen
        DBObject fObject = (DBObject) object.getAttribute(attributes[i]);
        if (fObject == null)
          continue;
        setAttribute(attributes[i],fObject.getID());
      }
      else {
        setAttribute(attributes[i],object.getAttribute(attributes[i]));
      }
    }
  }