/** Performs a deep copy on <i>other</i>. */
  public NoteAttributes(NoteAttributes other) {
    System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
    this.subjectDate = other.subjectDate;
    this.latitude = other.latitude;
    this.longitude = other.longitude;
    this.altitude = other.altitude;
    if (other.isSetAuthor()) {
      this.author = other.author;
    }
    if (other.isSetSource()) {
      this.source = other.source;
    }
    if (other.isSetSourceURL()) {
      this.sourceURL = other.sourceURL;
    }
    if (other.isSetSourceApplication()) {
      this.sourceApplication = other.sourceApplication;
    }
    this.shareDate = other.shareDate;
    if (other.isSetPlaceName()) {
      this.placeName = other.placeName;
    }
    if (other.isSetContentClass()) {
      this.contentClass = other.contentClass;
    }
    if (other.isSetApplicationData()) {
      this.applicationData = new LazyMap(other.applicationData);
    }
    if (other.isSetLastEditedBy()) {
      this.lastEditedBy = other.lastEditedBy;
    }
    if (other.isSetClassifications()) {
      Map<String, String> __this__classifications = new HashMap<String, String>();
      for (Map.Entry<String, String> other_element : other.classifications.entrySet()) {

        String other_element_key = other_element.getKey();
        String other_element_value = other_element.getValue();

        String __this__classifications_copy_key = other_element_key;

        String __this__classifications_copy_value = other_element_value;

        __this__classifications.put(
            __this__classifications_copy_key, __this__classifications_copy_value);
      }
      this.classifications = __this__classifications;
    }
  }
  public int compareTo(NoteAttributes other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    NoteAttributes typedOther = (NoteAttributes) other;

    lastComparison = Boolean.valueOf(isSetSubjectDate()).compareTo(typedOther.isSetSubjectDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSubjectDate()) {
      lastComparison = TBaseHelper.compareTo(this.subjectDate, typedOther.subjectDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLatitude()).compareTo(typedOther.isSetLatitude());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLatitude()) {
      lastComparison = TBaseHelper.compareTo(this.latitude, typedOther.latitude);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLongitude()).compareTo(typedOther.isSetLongitude());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLongitude()) {
      lastComparison = TBaseHelper.compareTo(this.longitude, typedOther.longitude);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAltitude()).compareTo(typedOther.isSetAltitude());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAltitude()) {
      lastComparison = TBaseHelper.compareTo(this.altitude, typedOther.altitude);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAuthor()).compareTo(typedOther.isSetAuthor());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAuthor()) {
      lastComparison = TBaseHelper.compareTo(this.author, typedOther.author);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSource()) {
      lastComparison = TBaseHelper.compareTo(this.source, typedOther.source);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSourceURL()).compareTo(typedOther.isSetSourceURL());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSourceURL()) {
      lastComparison = TBaseHelper.compareTo(this.sourceURL, typedOther.sourceURL);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetSourceApplication()).compareTo(typedOther.isSetSourceApplication());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSourceApplication()) {
      lastComparison = TBaseHelper.compareTo(this.sourceApplication, typedOther.sourceApplication);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetShareDate()).compareTo(typedOther.isSetShareDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShareDate()) {
      lastComparison = TBaseHelper.compareTo(this.shareDate, typedOther.shareDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPlaceName()).compareTo(typedOther.isSetPlaceName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPlaceName()) {
      lastComparison = TBaseHelper.compareTo(this.placeName, typedOther.placeName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetContentClass()).compareTo(typedOther.isSetContentClass());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetContentClass()) {
      lastComparison = TBaseHelper.compareTo(this.contentClass, typedOther.contentClass);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetApplicationData()).compareTo(typedOther.isSetApplicationData());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetApplicationData()) {
      lastComparison = TBaseHelper.compareTo(this.applicationData, typedOther.applicationData);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLastEditedBy()).compareTo(typedOther.isSetLastEditedBy());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLastEditedBy()) {
      lastComparison = TBaseHelper.compareTo(this.lastEditedBy, typedOther.lastEditedBy);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetClassifications()).compareTo(typedOther.isSetClassifications());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetClassifications()) {
      lastComparison = TBaseHelper.compareTo(this.classifications, typedOther.classifications);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
  public boolean equals(NoteAttributes that) {
    if (that == null) return false;

    boolean this_present_subjectDate = true && this.isSetSubjectDate();
    boolean that_present_subjectDate = true && that.isSetSubjectDate();
    if (this_present_subjectDate || that_present_subjectDate) {
      if (!(this_present_subjectDate && that_present_subjectDate)) return false;
      if (this.subjectDate != that.subjectDate) return false;
    }

    boolean this_present_latitude = true && this.isSetLatitude();
    boolean that_present_latitude = true && that.isSetLatitude();
    if (this_present_latitude || that_present_latitude) {
      if (!(this_present_latitude && that_present_latitude)) return false;
      if (this.latitude != that.latitude) return false;
    }

    boolean this_present_longitude = true && this.isSetLongitude();
    boolean that_present_longitude = true && that.isSetLongitude();
    if (this_present_longitude || that_present_longitude) {
      if (!(this_present_longitude && that_present_longitude)) return false;
      if (this.longitude != that.longitude) return false;
    }

    boolean this_present_altitude = true && this.isSetAltitude();
    boolean that_present_altitude = true && that.isSetAltitude();
    if (this_present_altitude || that_present_altitude) {
      if (!(this_present_altitude && that_present_altitude)) return false;
      if (this.altitude != that.altitude) return false;
    }

    boolean this_present_author = true && this.isSetAuthor();
    boolean that_present_author = true && that.isSetAuthor();
    if (this_present_author || that_present_author) {
      if (!(this_present_author && that_present_author)) return false;
      if (!this.author.equals(that.author)) return false;
    }

    boolean this_present_source = true && this.isSetSource();
    boolean that_present_source = true && that.isSetSource();
    if (this_present_source || that_present_source) {
      if (!(this_present_source && that_present_source)) return false;
      if (!this.source.equals(that.source)) return false;
    }

    boolean this_present_sourceURL = true && this.isSetSourceURL();
    boolean that_present_sourceURL = true && that.isSetSourceURL();
    if (this_present_sourceURL || that_present_sourceURL) {
      if (!(this_present_sourceURL && that_present_sourceURL)) return false;
      if (!this.sourceURL.equals(that.sourceURL)) return false;
    }

    boolean this_present_sourceApplication = true && this.isSetSourceApplication();
    boolean that_present_sourceApplication = true && that.isSetSourceApplication();
    if (this_present_sourceApplication || that_present_sourceApplication) {
      if (!(this_present_sourceApplication && that_present_sourceApplication)) return false;
      if (!this.sourceApplication.equals(that.sourceApplication)) return false;
    }

    boolean this_present_shareDate = true && this.isSetShareDate();
    boolean that_present_shareDate = true && that.isSetShareDate();
    if (this_present_shareDate || that_present_shareDate) {
      if (!(this_present_shareDate && that_present_shareDate)) return false;
      if (this.shareDate != that.shareDate) return false;
    }

    boolean this_present_placeName = true && this.isSetPlaceName();
    boolean that_present_placeName = true && that.isSetPlaceName();
    if (this_present_placeName || that_present_placeName) {
      if (!(this_present_placeName && that_present_placeName)) return false;
      if (!this.placeName.equals(that.placeName)) return false;
    }

    boolean this_present_contentClass = true && this.isSetContentClass();
    boolean that_present_contentClass = true && that.isSetContentClass();
    if (this_present_contentClass || that_present_contentClass) {
      if (!(this_present_contentClass && that_present_contentClass)) return false;
      if (!this.contentClass.equals(that.contentClass)) return false;
    }

    boolean this_present_applicationData = true && this.isSetApplicationData();
    boolean that_present_applicationData = true && that.isSetApplicationData();
    if (this_present_applicationData || that_present_applicationData) {
      if (!(this_present_applicationData && that_present_applicationData)) return false;
      if (!this.applicationData.equals(that.applicationData)) return false;
    }

    boolean this_present_lastEditedBy = true && this.isSetLastEditedBy();
    boolean that_present_lastEditedBy = true && that.isSetLastEditedBy();
    if (this_present_lastEditedBy || that_present_lastEditedBy) {
      if (!(this_present_lastEditedBy && that_present_lastEditedBy)) return false;
      if (!this.lastEditedBy.equals(that.lastEditedBy)) return false;
    }

    boolean this_present_classifications = true && this.isSetClassifications();
    boolean that_present_classifications = true && that.isSetClassifications();
    if (this_present_classifications || that_present_classifications) {
      if (!(this_present_classifications && that_present_classifications)) return false;
      if (!this.classifications.equals(that.classifications)) return false;
    }

    return true;
  }