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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetMyint(), other.isSetMyint());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMyint()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myint, other.myint);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMyString(), other.isSetMyString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMyString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myString, other.myString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUnderscore_int(), other.isSetUnderscore_int());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnderscore_int()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.underscore_int, other.underscore_int);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java