コード例 #1
0
  public boolean equals(DomainVersionMetadata that) {
    if (that == null) return false;

    boolean this_present_properties = true && this.is_set_properties();
    boolean that_present_properties = true && that.is_set_properties();
    if (this_present_properties || that_present_properties) {
      if (!(this_present_properties && that_present_properties)) return false;
      if (!this.properties.equals(that.properties)) return false;
    }

    boolean this_present_partitions = true && this.is_set_partitions();
    boolean that_present_partitions = true && that.is_set_partitions();
    if (this_present_partitions || that_present_partitions) {
      if (!(this_present_partitions && that_present_partitions)) return false;
      if (!this.partitions.equals(that.partitions)) return false;
    }

    boolean this_present_defunct = true;
    boolean that_present_defunct = true;
    if (this_present_defunct || that_present_defunct) {
      if (!(this_present_defunct && that_present_defunct)) return false;
      if (this.defunct != that.defunct) return false;
    }

    boolean this_present_closed_at = true;
    boolean that_present_closed_at = true;
    if (this_present_closed_at || that_present_closed_at) {
      if (!(this_present_closed_at && that_present_closed_at)) return false;
      if (this.closed_at != that.closed_at) return false;
    }

    return true;
  }
コード例 #2
0
  /** Performs a deep copy on <i>other</i>. */
  public DomainVersionMetadata(DomainVersionMetadata other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.is_set_properties()) {
      this.properties = org.apache.thrift.TBaseHelper.copyBinary(other.properties);
      ;
    }
    if (other.is_set_partitions()) {
      Map<Integer, PartitionMetadata> __this__partitions =
          new HashMap<Integer, PartitionMetadata>();
      for (Map.Entry<Integer, PartitionMetadata> other_element : other.partitions.entrySet()) {

        Integer other_element_key = other_element.getKey();
        PartitionMetadata other_element_value = other_element.getValue();

        Integer __this__partitions_copy_key = other_element_key;

        PartitionMetadata __this__partitions_copy_value =
            new PartitionMetadata(other_element_value);

        __this__partitions.put(__this__partitions_copy_key, __this__partitions_copy_value);
      }
      this.partitions = __this__partitions;
    }
    this.defunct = other.defunct;
    this.closed_at = other.closed_at;
  }
コード例 #3
0
  public int compareTo(DomainVersionMetadata other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(is_set_properties()).compareTo(typedOther.is_set_properties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_properties()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.properties, typedOther.properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_partitions()).compareTo(typedOther.is_set_partitions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_partitions()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.partitions, typedOther.partitions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_defunct()).compareTo(typedOther.is_set_defunct());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_defunct()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defunct, typedOther.defunct);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(is_set_closed_at()).compareTo(typedOther.is_set_closed_at());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_closed_at()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.closed_at, typedOther.closed_at);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }