@Override
  public int compareTo(ShowLocksResponseElement other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetLockid(), 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 = java.lang.Boolean.compare(isSetDbname(), 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 = java.lang.Boolean.compare(isSetTablename(), 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 = java.lang.Boolean.compare(isSetPartname(), 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 = java.lang.Boolean.compare(isSetState(), 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 = java.lang.Boolean.compare(isSetType(), 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 = java.lang.Boolean.compare(isSetTxnid(), 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 = java.lang.Boolean.compare(isSetLastheartbeat(), 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 = java.lang.Boolean.compare(isSetAcquiredat(), 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 = java.lang.Boolean.compare(isSetUser(), 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 = java.lang.Boolean.compare(isSetHostname(), other.isSetHostname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHostname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, other.hostname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetHeartbeatCount(), other.isSetHeartbeatCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHeartbeatCount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.heartbeatCount, other.heartbeatCount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAgentInfo(), other.isSetAgentInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAgentInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentInfo, other.agentInfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBlockedByExtId(), other.isSetBlockedByExtId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBlockedByExtId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByExtId, other.blockedByExtId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBlockedByIntId(), other.isSetBlockedByIntId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBlockedByIntId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockedByIntId, other.blockedByIntId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLockIdInternal(), other.isSetLockIdInternal());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLockIdInternal()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockIdInternal, other.lockIdInternal);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java