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

    int lastComparison = 0;
    AchieveResult typedOther = (AchieveResult) other;

    lastComparison = Boolean.valueOf(isSetScore()).compareTo(typedOther.isSetScore());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScore()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.score, typedOther.score);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsShot()).compareTo(typedOther.isSetIsShot());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsShot()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isShot, typedOther.isShot);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDetail()).compareTo(typedOther.isSetDetail());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDetail()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.detail, typedOther.detail);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }