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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetPktable_db(), other.isSetPktable_db());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPktable_db()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_db, other.pktable_db);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPktable_name(), other.isSetPktable_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPktable_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pktable_name, other.pktable_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPkcolumn_name(), other.isSetPkcolumn_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPkcolumn_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pkcolumn_name, other.pkcolumn_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFktable_db(), other.isSetFktable_db());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFktable_db()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_db, other.fktable_db);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFktable_name(), other.isSetFktable_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFktable_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fktable_name, other.fktable_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFkcolumn_name(), other.isSetFkcolumn_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFkcolumn_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fkcolumn_name, other.fkcolumn_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKey_seq(), other.isSetKey_seq());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKey_seq()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key_seq, other.key_seq);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUpdate_rule(), other.isSetUpdate_rule());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdate_rule()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update_rule, other.update_rule);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDelete_rule(), other.isSetDelete_rule());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDelete_rule()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delete_rule, other.delete_rule);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFk_name(), other.isSetFk_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFk_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fk_name, other.fk_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPk_name(), other.isSetPk_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPk_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pk_name, other.pk_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnable_cstr(), other.isSetEnable_cstr());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnable_cstr()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_cstr, other.enable_cstr);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetValidate_cstr(), other.isSetValidate_cstr());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValidate_cstr()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validate_cstr, other.validate_cstr);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRely_cstr(), other.isSetRely_cstr());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRely_cstr()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rely_cstr, other.rely_cstr);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCatName(), other.isSetCatName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCatName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
      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/SQLForeignKey.java