Пример #1
0
  @Override
  public int compareTo(BatchQueue other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetQueueName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetQueueDescription()).compareTo(other.isSetQueueDescription());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetQueueDescription()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.queueDescription, other.queueDescription);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxRunTime()).compareTo(other.isSetMaxRunTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxRunTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRunTime, other.maxRunTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxNodes()).compareTo(other.isSetMaxNodes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxNodes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxNodes, other.maxNodes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxProcessors()).compareTo(other.isSetMaxProcessors());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxProcessors()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.maxProcessors, other.maxProcessors);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxJobsInQueue()).compareTo(other.isSetMaxJobsInQueue());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxJobsInQueue()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.maxJobsInQueue, other.maxJobsInQueue);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxMemory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMemory, other.maxMemory);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }