Ejemplo n.º 1
0
  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("\nid=" + uid + " name=" + name + " pic=" + pic_square);
    if (education_history != null) {
      sb.append("\nedu history=" + education_history.size());
      for (int i = 0; i < education_history.size(); i++) {
        sb.append("\n" + education_history.get(i).toString());
      }
    }

    if (work_history != null) {
      sb.append("\nwork history=" + work_history.size());
      for (int i = 0; i < work_history.size(); i++) {
        sb.append("\n" + work_history.get(i).toString());
      }
    }

    if (current_location != null) {
      sb.append("\n current loc=" + current_location.toString());
    }

    if (hometown_location != null) {
      sb.append("\n home town=" + hometown_location.toString());
    }

    if (meeting_for != null) {
      sb.append("\n meeting for");
      for (int i = 0; i < meeting_for.size(); i++) {
        sb.append(" " + meeting_for.get(i));
      }
    }

    if (meeting_sex != null) {
      sb.append("\n meeting sex");
      for (int i = 0; i < meeting_sex.size(); i++) {
        sb.append(" " + meeting_sex.get(i));
      }
    }

    if (online_presence != null) {
      sb.append("\n online_presence=" + online_presence);
    }

    return sb.toString();
  }
Ejemplo n.º 2
0
  public FacebookUser clone() {
    FacebookUser user = new FacebookUser();
    user.uid = this.uid;
    user.birthday = this.birthday;
    user.first_name = this.first_name;
    user.last_name = this.last_name;
    user.name = this.name;
    user.pic_square = this.pic_square;
    user.pic = this.pic;
    user.pic_small = this.pic_small;
    user.sex = this.sex;
    user.event_sync = this.event_sync;
    user.event_last_sync = this.event_last_sync;
    user.ceid = this.ceid;
    user.message = this.message;
    user.statusid = this.statusid;
    user.statustime = this.statustime;
    user.bd_date = this.bd_date;
    user.selected = this.selected;
    user.isfriend = this.isfriend;

    user.about_me = this.about_me;
    user.activities = this.activities;
    user.quotes = this.quotes;
    user.books = this.books;
    user.movies = this.movies;
    user.music = this.music;
    user.tv = this.tv;
    user.online_presence = this.online_presence;
    user.is_app_user = this.is_app_user;
    user.relationship_status = relationship_status;
    user.isShoutcut = this.isShoutcut;

    if (this.current_location != null) {
      user.current_location = new Current_Location();
      user.current_location.city = this.current_location.city;
      user.current_location.country = this.current_location.country;
      user.current_location.state = this.current_location.state;
      user.current_location.zip = this.current_location.zip;
    }

    if (this.education_history != null && this.education_history.size() > 0) {
      user.education_history = new ArrayList<Education_History>();
      for (int i = 0; i < this.education_history.size(); i++) {
        Education_History item = this.education_history.get(i);
        Education_History newitem = new Education_History();
        newitem.degree = item.degree;
        newitem.name = item.name;
        newitem.year = item.year;
        newitem.concentrations = new ArrayList<String>();
        for (int j = 0; i < item.concentrations.size(); j++) {
          newitem.concentrations.add(item.concentrations.get(j));
        }
        user.education_history.add(newitem);
      }
    }

    if (this.hometown_location != null) {
      user.hometown_location = new Current_Location();
      user.hometown_location.city = hometown_location.city;
      user.hometown_location.country = hometown_location.country;
      user.hometown_location.state = hometown_location.state;
      user.hometown_location.zip = hometown_location.zip;
    }

    if (meeting_for != null && meeting_for.size() > 0) {
      user.meeting_for = new ArrayList<String>();
      user.meeting_for.addAll(meeting_for);
    }

    if (meeting_sex != null && meeting_sex.size() > 0) {
      user.meeting_sex = new ArrayList<String>();
      user.meeting_sex.addAll(meeting_sex);
    }

    if (work_history != null && work_history.size() > 0) {
      user.work_history = new ArrayList<Work_History>();
      for (int i = 0; i < work_history.size(); i++) {
        Work_History item = work_history.get(i);
        Work_History object = new Work_History();
        object.city = item.city;
        object.country = item.company_name;
        object.state = item.state;

        object.company_name = item.company_name;
        object.description = item.description;
        object.position = item.position;
        object.start_date = item.start_date;
        object.end_date = item.end_date;
        user.work_history.add(object);
      }
    }
    return user;
  }