Example #1
0
  public boolean equals(BatchQueue that) {
    if (that == null) return false;

    boolean this_present_queueName = true && this.isSetQueueName();
    boolean that_present_queueName = true && that.isSetQueueName();
    if (this_present_queueName || that_present_queueName) {
      if (!(this_present_queueName && that_present_queueName)) return false;
      if (!this.queueName.equals(that.queueName)) return false;
    }

    boolean this_present_queueDescription = true && this.isSetQueueDescription();
    boolean that_present_queueDescription = true && that.isSetQueueDescription();
    if (this_present_queueDescription || that_present_queueDescription) {
      if (!(this_present_queueDescription && that_present_queueDescription)) return false;
      if (!this.queueDescription.equals(that.queueDescription)) return false;
    }

    boolean this_present_maxRunTime = true && this.isSetMaxRunTime();
    boolean that_present_maxRunTime = true && that.isSetMaxRunTime();
    if (this_present_maxRunTime || that_present_maxRunTime) {
      if (!(this_present_maxRunTime && that_present_maxRunTime)) return false;
      if (this.maxRunTime != that.maxRunTime) return false;
    }

    boolean this_present_maxNodes = true && this.isSetMaxNodes();
    boolean that_present_maxNodes = true && that.isSetMaxNodes();
    if (this_present_maxNodes || that_present_maxNodes) {
      if (!(this_present_maxNodes && that_present_maxNodes)) return false;
      if (this.maxNodes != that.maxNodes) return false;
    }

    boolean this_present_maxProcessors = true && this.isSetMaxProcessors();
    boolean that_present_maxProcessors = true && that.isSetMaxProcessors();
    if (this_present_maxProcessors || that_present_maxProcessors) {
      if (!(this_present_maxProcessors && that_present_maxProcessors)) return false;
      if (this.maxProcessors != that.maxProcessors) return false;
    }

    boolean this_present_maxJobsInQueue = true && this.isSetMaxJobsInQueue();
    boolean that_present_maxJobsInQueue = true && that.isSetMaxJobsInQueue();
    if (this_present_maxJobsInQueue || that_present_maxJobsInQueue) {
      if (!(this_present_maxJobsInQueue && that_present_maxJobsInQueue)) return false;
      if (this.maxJobsInQueue != that.maxJobsInQueue) return false;
    }

    boolean this_present_maxMemory = true && this.isSetMaxMemory();
    boolean that_present_maxMemory = true && that.isSetMaxMemory();
    if (this_present_maxMemory || that_present_maxMemory) {
      if (!(this_present_maxMemory && that_present_maxMemory)) return false;
      if (this.maxMemory != that.maxMemory) return false;
    }

    return true;
  }
Example #2
0
 /** Performs a deep copy on <i>other</i>. */
 public BatchQueue(BatchQueue other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetQueueName()) {
     this.queueName = other.queueName;
   }
   if (other.isSetQueueDescription()) {
     this.queueDescription = other.queueDescription;
   }
   this.maxRunTime = other.maxRunTime;
   this.maxNodes = other.maxNodes;
   this.maxProcessors = other.maxProcessors;
   this.maxJobsInQueue = other.maxJobsInQueue;
   this.maxMemory = other.maxMemory;
 }
Example #3
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;
  }