Exemplo n.º 1
0
 /** Performs a deep copy on <i>other</i>. */
 public CompactionRequest(CompactionRequest other) {
   if (other.isSetDbname()) {
     this.dbname = other.dbname;
   }
   if (other.isSetTablename()) {
     this.tablename = other.tablename;
   }
   if (other.isSetPartitionname()) {
     this.partitionname = other.partitionname;
   }
   if (other.isSetType()) {
     this.type = other.type;
   }
   if (other.isSetRunas()) {
     this.runas = other.runas;
   }
 }
Exemplo n.º 2
0
  public boolean equals(CompactionRequest that) {
    if (that == null) return false;

    boolean this_present_dbname = true && this.isSetDbname();
    boolean that_present_dbname = true && that.isSetDbname();
    if (this_present_dbname || that_present_dbname) {
      if (!(this_present_dbname && that_present_dbname)) return false;
      if (!this.dbname.equals(that.dbname)) return false;
    }

    boolean this_present_tablename = true && this.isSetTablename();
    boolean that_present_tablename = true && that.isSetTablename();
    if (this_present_tablename || that_present_tablename) {
      if (!(this_present_tablename && that_present_tablename)) return false;
      if (!this.tablename.equals(that.tablename)) return false;
    }

    boolean this_present_partitionname = true && this.isSetPartitionname();
    boolean that_present_partitionname = true && that.isSetPartitionname();
    if (this_present_partitionname || that_present_partitionname) {
      if (!(this_present_partitionname && that_present_partitionname)) return false;
      if (!this.partitionname.equals(that.partitionname)) return false;
    }

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type)) return false;
      if (!this.type.equals(that.type)) return false;
    }

    boolean this_present_runas = true && this.isSetRunas();
    boolean that_present_runas = true && that.isSetRunas();
    if (this_present_runas || that_present_runas) {
      if (!(this_present_runas && that_present_runas)) return false;
      if (!this.runas.equals(that.runas)) return false;
    }

    return true;
  }
Exemplo n.º 3
0
  @Override
  public int compareTo(CompactionRequest other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetDbname()).compareTo(other.isSetDbname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbname, other.dbname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTablename()).compareTo(other.isSetTablename());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTablename()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablename, other.tablename);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPartitionname()).compareTo(other.isSetPartitionname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartitionname()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.partitionname, other.partitionname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRunas()).compareTo(other.isSetRunas());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRunas()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runas, other.runas);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }