예제 #1
0
  public boolean equals(Deletion that) {
    if (that == null) return false;

    boolean this_present_timestamp = true;
    boolean that_present_timestamp = true;
    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_super_column = true && this.isSetSuper_column();
    boolean that_present_super_column = true && that.isSetSuper_column();
    if (this_present_super_column || that_present_super_column) {
      if (!(this_present_super_column && that_present_super_column)) return false;
      if (!java.util.Arrays.equals(this.super_column, that.super_column)) return false;
    }

    boolean this_present_predicate = true && this.isSetPredicate();
    boolean that_present_predicate = true && that.isSetPredicate();
    if (this_present_predicate || that_present_predicate) {
      if (!(this_present_predicate && that_present_predicate)) return false;
      if (!this.predicate.equals(that.predicate)) return false;
    }

    return true;
  }
예제 #2
0
 /** Performs a deep copy on <i>other</i>. */
 public Deletion(Deletion other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   this.timestamp = other.timestamp;
   if (other.isSetSuper_column()) {
     this.super_column = new byte[other.super_column.length];
     System.arraycopy(other.super_column, 0, super_column, 0, other.super_column.length);
   }
   if (other.isSetPredicate()) {
     this.predicate = new SlicePredicate(other.predicate);
   }
 }
예제 #3
0
  public int compareTo(Deletion other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimestamp()) {
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSuper_column()).compareTo(typedOther.isSetSuper_column());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSuper_column()) {
      lastComparison = TBaseHelper.compareTo(super_column, typedOther.super_column);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPredicate()).compareTo(typedOther.isSetPredicate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPredicate()) {
      lastComparison = TBaseHelper.compareTo(predicate, typedOther.predicate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }