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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsRunning()).compareTo(other.isSetIsRunning());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsRunning()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRunning, other.isRunning);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }