예제 #1
0
 /** Performs a deep copy on <i>other</i>. */
 public TGet(TGet other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   if (other.isSetRow()) {
     this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
     ;
   }
   if (other.isSetColumns()) {
     List<TColumn> __this__columns = new ArrayList<TColumn>();
     for (TColumn other_element : other.columns) {
       __this__columns.add(new TColumn(other_element));
     }
     this.columns = __this__columns;
   }
   this.timestamp = other.timestamp;
   if (other.isSetTimeRange()) {
     this.timeRange = new TTimeRange(other.timeRange);
   }
   this.maxVersions = other.maxVersions;
 }
예제 #2
0
  public boolean equals(TGet that) {
    if (that == null) return false;

    boolean this_present_row = true && this.isSetRow();
    boolean that_present_row = true && that.isSetRow();
    if (this_present_row || that_present_row) {
      if (!(this_present_row && that_present_row)) return false;
      if (!this.row.equals(that.row)) return false;
    }

    boolean this_present_columns = true && this.isSetColumns();
    boolean that_present_columns = true && that.isSetColumns();
    if (this_present_columns || that_present_columns) {
      if (!(this_present_columns && that_present_columns)) return false;
      if (!this.columns.equals(that.columns)) return false;
    }

    boolean this_present_timestamp = true && this.isSetTimestamp();
    boolean that_present_timestamp = true && that.isSetTimestamp();
    if (this_present_timestamp || that_present_timestamp) {
      if (!(this_present_timestamp && that_present_timestamp)) return false;
      if (this.timestamp != that.timestamp) return false;
    }

    boolean this_present_timeRange = true && this.isSetTimeRange();
    boolean that_present_timeRange = true && that.isSetTimeRange();
    if (this_present_timeRange || that_present_timeRange) {
      if (!(this_present_timeRange && that_present_timeRange)) return false;
      if (!this.timeRange.equals(that.timeRange)) return false;
    }

    boolean this_present_maxVersions = true && this.isSetMaxVersions();
    boolean that_present_maxVersions = true && that.isSetMaxVersions();
    if (this_present_maxVersions || that_present_maxVersions) {
      if (!(this_present_maxVersions && that_present_maxVersions)) return false;
      if (this.maxVersions != that.maxVersions) return false;
    }

    return true;
  }
예제 #3
0
  public int compareTo(TGet other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRow()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumns()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimestamp()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeRange()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxVersions()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }