Example #1
0
 /** Performs a deep copy on <i>other</i>. */
 public ShowLocksResponseElement(ShowLocksResponseElement other) {
   __isset_bitfield = other.__isset_bitfield;
   this.lockid = other.lockid;
   if (other.isSetDbname()) {
     this.dbname = other.dbname;
   }
   if (other.isSetTablename()) {
     this.tablename = other.tablename;
   }
   if (other.isSetPartname()) {
     this.partname = other.partname;
   }
   if (other.isSetState()) {
     this.state = other.state;
   }
   if (other.isSetType()) {
     this.type = other.type;
   }
   this.txnid = other.txnid;
   this.lastheartbeat = other.lastheartbeat;
   this.acquiredat = other.acquiredat;
   if (other.isSetUser()) {
     this.user = other.user;
   }
   if (other.isSetHostname()) {
     this.hostname = other.hostname;
   }
 }
Example #2
0
  @Override
  public int compareTo(ShowLocksResponseElement other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetLockid()).compareTo(other.isSetLockid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLockid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockid, other.lockid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    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(isSetPartname()).compareTo(other.isSetPartname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partname, other.partname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
      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(isSetTxnid()).compareTo(other.isSetTxnid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTxnid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnid, other.txnid);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLastheartbeat()).compareTo(other.isSetLastheartbeat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLastheartbeat()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.lastheartbeat, other.lastheartbeat);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAcquiredat()).compareTo(other.isSetAcquiredat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAcquiredat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acquiredat, other.acquiredat);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUser()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHostname()).compareTo(other.isSetHostname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHostname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Example #3
0
  public boolean equals(ShowLocksResponseElement that) {
    if (that == null) return false;

    boolean this_present_lockid = true;
    boolean that_present_lockid = true;
    if (this_present_lockid || that_present_lockid) {
      if (!(this_present_lockid && that_present_lockid)) return false;
      if (this.lockid != that.lockid) 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_partname = true && this.isSetPartname();
    boolean that_present_partname = true && that.isSetPartname();
    if (this_present_partname || that_present_partname) {
      if (!(this_present_partname && that_present_partname)) return false;
      if (!this.partname.equals(that.partname)) return false;
    }

    boolean this_present_state = true && this.isSetState();
    boolean that_present_state = true && that.isSetState();
    if (this_present_state || that_present_state) {
      if (!(this_present_state && that_present_state)) return false;
      if (!this.state.equals(that.state)) 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_txnid = true && this.isSetTxnid();
    boolean that_present_txnid = true && that.isSetTxnid();
    if (this_present_txnid || that_present_txnid) {
      if (!(this_present_txnid && that_present_txnid)) return false;
      if (this.txnid != that.txnid) return false;
    }

    boolean this_present_lastheartbeat = true;
    boolean that_present_lastheartbeat = true;
    if (this_present_lastheartbeat || that_present_lastheartbeat) {
      if (!(this_present_lastheartbeat && that_present_lastheartbeat)) return false;
      if (this.lastheartbeat != that.lastheartbeat) return false;
    }

    boolean this_present_acquiredat = true && this.isSetAcquiredat();
    boolean that_present_acquiredat = true && that.isSetAcquiredat();
    if (this_present_acquiredat || that_present_acquiredat) {
      if (!(this_present_acquiredat && that_present_acquiredat)) return false;
      if (this.acquiredat != that.acquiredat) return false;
    }

    boolean this_present_user = true && this.isSetUser();
    boolean that_present_user = true && that.isSetUser();
    if (this_present_user || that_present_user) {
      if (!(this_present_user && that_present_user)) return false;
      if (!this.user.equals(that.user)) return false;
    }

    boolean this_present_hostname = true && this.isSetHostname();
    boolean that_present_hostname = true && that.isSetHostname();
    if (this_present_hostname || that_present_hostname) {
      if (!(this_present_hostname && that_present_hostname)) return false;
      if (!this.hostname.equals(that.hostname)) return false;
    }

    return true;
  }