예제 #1
0
  public boolean equals(TIncrement 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_attributes = true && this.isSetAttributes();
    boolean that_present_attributes = true && that.isSetAttributes();
    if (this_present_attributes || that_present_attributes) {
      if (!(this_present_attributes && that_present_attributes)) return false;
      if (!this.attributes.equals(that.attributes)) return false;
    }

    boolean this_present_durability = true && this.isSetDurability();
    boolean that_present_durability = true && that.isSetDurability();
    if (this_present_durability || that_present_durability) {
      if (!(this_present_durability && that_present_durability)) return false;
      if (!this.durability.equals(that.durability)) return false;
    }

    boolean this_present_cellVisibility = true && this.isSetCellVisibility();
    boolean that_present_cellVisibility = true && that.isSetCellVisibility();
    if (this_present_cellVisibility || that_present_cellVisibility) {
      if (!(this_present_cellVisibility && that_present_cellVisibility)) return false;
      if (!this.cellVisibility.equals(that.cellVisibility)) return false;
    }

    return true;
  }
예제 #2
0
  /** Performs a deep copy on <i>other</i>. */
  public TIncrement(TIncrement other) {
    if (other.isSetRow()) {
      this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
      ;
    }
    if (other.isSetColumns()) {
      List<TColumnIncrement> __this__columns = new ArrayList<TColumnIncrement>();
      for (TColumnIncrement other_element : other.columns) {
        __this__columns.add(new TColumnIncrement(other_element));
      }
      this.columns = __this__columns;
    }
    if (other.isSetAttributes()) {
      Map<ByteBuffer, ByteBuffer> __this__attributes = new HashMap<ByteBuffer, ByteBuffer>();
      for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {

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

        ByteBuffer __this__attributes_copy_key =
            org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
        ;

        ByteBuffer __this__attributes_copy_value =
            org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
        ;

        __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
      }
      this.attributes = __this__attributes;
    }
    if (other.isSetDurability()) {
      this.durability = other.durability;
    }
    if (other.isSetCellVisibility()) {
      this.cellVisibility = new TCellVisibility(other.cellVisibility);
    }
  }
예제 #3
0
  public int compareTo(TIncrement other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    TIncrement typedOther = (TIncrement) 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(isSetAttributes()).compareTo(typedOther.isSetAttributes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAttributes()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDurability()).compareTo(typedOther.isSetDurability());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDurability()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.durability, typedOther.durability);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetCellVisibility()).compareTo(typedOther.isSetCellVisibility());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCellVisibility()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.cellVisibility, typedOther.cellVisibility);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }