@Override public void write(org.apache.thrift.protocol.TProtocol prot, ShowLocksResponseElement struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI64(struct.lockid); oprot.writeString(struct.dbname); oprot.writeI32(struct.state.getValue()); oprot.writeI32(struct.type.getValue()); oprot.writeI64(struct.lastheartbeat); oprot.writeString(struct.user); oprot.writeString(struct.hostname); BitSet optionals = new BitSet(); if (struct.isSetTablename()) { optionals.set(0); } if (struct.isSetPartname()) { optionals.set(1); } if (struct.isSetTxnid()) { optionals.set(2); } if (struct.isSetAcquiredat()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetTablename()) { oprot.writeString(struct.tablename); } if (struct.isSetPartname()) { oprot.writeString(struct.partname); } if (struct.isSetTxnid()) { oprot.writeI64(struct.txnid); } if (struct.isSetAcquiredat()) { oprot.writeI64(struct.acquiredat); } }
@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; }
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; }
public void write(org.apache.thrift.protocol.TProtocol oprot, ShowLocksResponseElement struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(LOCKID_FIELD_DESC); oprot.writeI64(struct.lockid); oprot.writeFieldEnd(); if (struct.dbname != null) { oprot.writeFieldBegin(DBNAME_FIELD_DESC); oprot.writeString(struct.dbname); oprot.writeFieldEnd(); } if (struct.tablename != null) { if (struct.isSetTablename()) { oprot.writeFieldBegin(TABLENAME_FIELD_DESC); oprot.writeString(struct.tablename); oprot.writeFieldEnd(); } } if (struct.partname != null) { if (struct.isSetPartname()) { oprot.writeFieldBegin(PARTNAME_FIELD_DESC); oprot.writeString(struct.partname); oprot.writeFieldEnd(); } } if (struct.state != null) { oprot.writeFieldBegin(STATE_FIELD_DESC); oprot.writeI32(struct.state.getValue()); oprot.writeFieldEnd(); } if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.isSetTxnid()) { oprot.writeFieldBegin(TXNID_FIELD_DESC); oprot.writeI64(struct.txnid); oprot.writeFieldEnd(); } oprot.writeFieldBegin(LASTHEARTBEAT_FIELD_DESC); oprot.writeI64(struct.lastheartbeat); oprot.writeFieldEnd(); if (struct.isSetAcquiredat()) { oprot.writeFieldBegin(ACQUIREDAT_FIELD_DESC); oprot.writeI64(struct.acquiredat); oprot.writeFieldEnd(); } if (struct.user != null) { oprot.writeFieldBegin(USER_FIELD_DESC); oprot.writeString(struct.user); oprot.writeFieldEnd(); } if (struct.hostname != null) { oprot.writeFieldBegin(HOSTNAME_FIELD_DESC); oprot.writeString(struct.hostname); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }