コード例 #1
0
  public int compareTo(NotesMetadataResultSpec other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetIncludeTitle()).compareTo(typedOther.isSetIncludeTitle());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeTitle()) {
      lastComparison = TBaseHelper.compareTo(this.includeTitle, typedOther.includeTitle);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeContentLength())
            .compareTo(typedOther.isSetIncludeContentLength());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeContentLength()) {
      lastComparison =
          TBaseHelper.compareTo(this.includeContentLength, typedOther.includeContentLength);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeCreated()).compareTo(typedOther.isSetIncludeCreated());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeCreated()) {
      lastComparison = TBaseHelper.compareTo(this.includeCreated, typedOther.includeCreated);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeUpdated()).compareTo(typedOther.isSetIncludeUpdated());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeUpdated()) {
      lastComparison = TBaseHelper.compareTo(this.includeUpdated, typedOther.includeUpdated);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeUpdateSequenceNum())
            .compareTo(typedOther.isSetIncludeUpdateSequenceNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeUpdateSequenceNum()) {
      lastComparison =
          TBaseHelper.compareTo(this.includeUpdateSequenceNum, typedOther.includeUpdateSequenceNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeNotebookGuid())
            .compareTo(typedOther.isSetIncludeNotebookGuid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeNotebookGuid()) {
      lastComparison =
          TBaseHelper.compareTo(this.includeNotebookGuid, typedOther.includeNotebookGuid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeTagGuids()).compareTo(typedOther.isSetIncludeTagGuids());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeTagGuids()) {
      lastComparison = TBaseHelper.compareTo(this.includeTagGuids, typedOther.includeTagGuids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeAttributes()).compareTo(typedOther.isSetIncludeAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeAttributes()) {
      lastComparison = TBaseHelper.compareTo(this.includeAttributes, typedOther.includeAttributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeLargestResourceMime())
            .compareTo(typedOther.isSetIncludeLargestResourceMime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeLargestResourceMime()) {
      lastComparison =
          TBaseHelper.compareTo(
              this.includeLargestResourceMime, typedOther.includeLargestResourceMime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetIncludeLargestResourceSize())
            .compareTo(typedOther.isSetIncludeLargestResourceSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIncludeLargestResourceSize()) {
      lastComparison =
          TBaseHelper.compareTo(
              this.includeLargestResourceSize, typedOther.includeLargestResourceSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #2
0
  public boolean equals(NotesMetadataResultSpec that) {
    if (that == null) return false;

    boolean this_present_includeTitle = true && this.isSetIncludeTitle();
    boolean that_present_includeTitle = true && that.isSetIncludeTitle();
    if (this_present_includeTitle || that_present_includeTitle) {
      if (!(this_present_includeTitle && that_present_includeTitle)) return false;
      if (this.includeTitle != that.includeTitle) return false;
    }

    boolean this_present_includeContentLength = true && this.isSetIncludeContentLength();
    boolean that_present_includeContentLength = true && that.isSetIncludeContentLength();
    if (this_present_includeContentLength || that_present_includeContentLength) {
      if (!(this_present_includeContentLength && that_present_includeContentLength)) return false;
      if (this.includeContentLength != that.includeContentLength) return false;
    }

    boolean this_present_includeCreated = true && this.isSetIncludeCreated();
    boolean that_present_includeCreated = true && that.isSetIncludeCreated();
    if (this_present_includeCreated || that_present_includeCreated) {
      if (!(this_present_includeCreated && that_present_includeCreated)) return false;
      if (this.includeCreated != that.includeCreated) return false;
    }

    boolean this_present_includeUpdated = true && this.isSetIncludeUpdated();
    boolean that_present_includeUpdated = true && that.isSetIncludeUpdated();
    if (this_present_includeUpdated || that_present_includeUpdated) {
      if (!(this_present_includeUpdated && that_present_includeUpdated)) return false;
      if (this.includeUpdated != that.includeUpdated) return false;
    }

    boolean this_present_includeUpdateSequenceNum = true && this.isSetIncludeUpdateSequenceNum();
    boolean that_present_includeUpdateSequenceNum = true && that.isSetIncludeUpdateSequenceNum();
    if (this_present_includeUpdateSequenceNum || that_present_includeUpdateSequenceNum) {
      if (!(this_present_includeUpdateSequenceNum && that_present_includeUpdateSequenceNum))
        return false;
      if (this.includeUpdateSequenceNum != that.includeUpdateSequenceNum) return false;
    }

    boolean this_present_includeNotebookGuid = true && this.isSetIncludeNotebookGuid();
    boolean that_present_includeNotebookGuid = true && that.isSetIncludeNotebookGuid();
    if (this_present_includeNotebookGuid || that_present_includeNotebookGuid) {
      if (!(this_present_includeNotebookGuid && that_present_includeNotebookGuid)) return false;
      if (this.includeNotebookGuid != that.includeNotebookGuid) return false;
    }

    boolean this_present_includeTagGuids = true && this.isSetIncludeTagGuids();
    boolean that_present_includeTagGuids = true && that.isSetIncludeTagGuids();
    if (this_present_includeTagGuids || that_present_includeTagGuids) {
      if (!(this_present_includeTagGuids && that_present_includeTagGuids)) return false;
      if (this.includeTagGuids != that.includeTagGuids) return false;
    }

    boolean this_present_includeAttributes = true && this.isSetIncludeAttributes();
    boolean that_present_includeAttributes = true && that.isSetIncludeAttributes();
    if (this_present_includeAttributes || that_present_includeAttributes) {
      if (!(this_present_includeAttributes && that_present_includeAttributes)) return false;
      if (this.includeAttributes != that.includeAttributes) return false;
    }

    boolean this_present_includeLargestResourceMime =
        true && this.isSetIncludeLargestResourceMime();
    boolean that_present_includeLargestResourceMime =
        true && that.isSetIncludeLargestResourceMime();
    if (this_present_includeLargestResourceMime || that_present_includeLargestResourceMime) {
      if (!(this_present_includeLargestResourceMime && that_present_includeLargestResourceMime))
        return false;
      if (this.includeLargestResourceMime != that.includeLargestResourceMime) return false;
    }

    boolean this_present_includeLargestResourceSize =
        true && this.isSetIncludeLargestResourceSize();
    boolean that_present_includeLargestResourceSize =
        true && that.isSetIncludeLargestResourceSize();
    if (this_present_includeLargestResourceSize || that_present_includeLargestResourceSize) {
      if (!(this_present_includeLargestResourceSize && that_present_includeLargestResourceSize))
        return false;
      if (this.includeLargestResourceSize != that.includeLargestResourceSize) return false;
    }

    return true;
  }