Exemplo n.º 1
0
  public boolean equals(ChosenMenuItem that) {
    if (that == null) return false;

    boolean this_present_menuItemId = true;
    boolean that_present_menuItemId = true;
    if (this_present_menuItemId || that_present_menuItemId) {
      if (!(this_present_menuItemId && that_present_menuItemId)) return false;
      if (this.menuItemId != that.menuItemId) return false;
    }

    boolean this_present_singleChoiceOptions = true && this.isSetSingleChoiceOptions();
    boolean that_present_singleChoiceOptions = true && that.isSetSingleChoiceOptions();
    if (this_present_singleChoiceOptions || that_present_singleChoiceOptions) {
      if (!(this_present_singleChoiceOptions && that_present_singleChoiceOptions)) return false;
      if (!this.singleChoiceOptions.equals(that.singleChoiceOptions)) return false;
    }

    boolean this_present_multiChoiceOptions = true && this.isSetMultiChoiceOptions();
    boolean that_present_multiChoiceOptions = true && that.isSetMultiChoiceOptions();
    if (this_present_multiChoiceOptions || that_present_multiChoiceOptions) {
      if (!(this_present_multiChoiceOptions && that_present_multiChoiceOptions)) return false;
      if (!this.multiChoiceOptions.equals(that.multiChoiceOptions)) return false;
    }

    boolean this_present_comments = true && this.isSetComments();
    boolean that_present_comments = true && that.isSetComments();
    if (this_present_comments || that_present_comments) {
      if (!(this_present_comments && that_present_comments)) return false;
      if (!this.comments.equals(that.comments)) return false;
    }

    return true;
  }
Exemplo n.º 2
0
 /** Performs a deep copy on <i>other</i>. */
 public ChosenMenuItem(ChosenMenuItem other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   this.menuItemId = other.menuItemId;
   if (other.isSetSingleChoiceOptions()) {
     List<org.pocketcampus.platform.sdk.shared.common.ChosenSingleChoiceOption>
         __this__singleChoiceOptions =
             new ArrayList<org.pocketcampus.platform.sdk.shared.common.ChosenSingleChoiceOption>();
     for (org.pocketcampus.platform.sdk.shared.common.ChosenSingleChoiceOption other_element :
         other.singleChoiceOptions) {
       __this__singleChoiceOptions.add(
           new org.pocketcampus.platform.sdk.shared.common.ChosenSingleChoiceOption(
               other_element));
     }
     this.singleChoiceOptions = __this__singleChoiceOptions;
   }
   if (other.isSetMultiChoiceOptions()) {
     List<org.pocketcampus.platform.sdk.shared.common.ChosenMultiChoiceOption>
         __this__multiChoiceOptions =
             new ArrayList<org.pocketcampus.platform.sdk.shared.common.ChosenMultiChoiceOption>();
     for (org.pocketcampus.platform.sdk.shared.common.ChosenMultiChoiceOption other_element :
         other.multiChoiceOptions) {
       __this__multiChoiceOptions.add(
           new org.pocketcampus.platform.sdk.shared.common.ChosenMultiChoiceOption(other_element));
     }
     this.multiChoiceOptions = __this__multiChoiceOptions;
   }
   if (other.isSetComments()) {
     this.comments = other.comments;
   }
 }
Exemplo n.º 3
0
  public int compareTo(ChosenMenuItem other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetMenuItemId()).compareTo(typedOther.isSetMenuItemId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMenuItemId()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.menuItemId, typedOther.menuItemId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetSingleChoiceOptions())
            .compareTo(typedOther.isSetSingleChoiceOptions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSingleChoiceOptions()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.singleChoiceOptions, typedOther.singleChoiceOptions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetMultiChoiceOptions()).compareTo(typedOther.isSetMultiChoiceOptions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMultiChoiceOptions()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.multiChoiceOptions, typedOther.multiChoiceOptions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetComments()).compareTo(typedOther.isSetComments());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetComments()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comments, typedOther.comments);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }