コード例 #1
0
  public boolean equals(TOperationHandle that) {
    if (that == null) return false;

    boolean this_present_operationId = true && this.isSetOperationId();
    boolean that_present_operationId = true && that.isSetOperationId();
    if (this_present_operationId || that_present_operationId) {
      if (!(this_present_operationId && that_present_operationId)) return false;
      if (!this.operationId.equals(that.operationId)) return false;
    }

    boolean this_present_operationType = true && this.isSetOperationType();
    boolean that_present_operationType = true && that.isSetOperationType();
    if (this_present_operationType || that_present_operationType) {
      if (!(this_present_operationType && that_present_operationType)) return false;
      if (!this.operationType.equals(that.operationType)) return false;
    }

    boolean this_present_hasResultSet = true;
    boolean that_present_hasResultSet = true;
    if (this_present_hasResultSet || that_present_hasResultSet) {
      if (!(this_present_hasResultSet && that_present_hasResultSet)) return false;
      if (this.hasResultSet != that.hasResultSet) return false;
    }

    boolean this_present_modifiedRowCount = true && this.isSetModifiedRowCount();
    boolean that_present_modifiedRowCount = true && that.isSetModifiedRowCount();
    if (this_present_modifiedRowCount || that_present_modifiedRowCount) {
      if (!(this_present_modifiedRowCount && that_present_modifiedRowCount)) return false;
      if (this.modifiedRowCount != that.modifiedRowCount) return false;
    }

    return true;
  }
コード例 #2
0
  public int compareTo(TOperationHandle other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(typedOther.isSetOperationId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperationId()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.operationId, typedOther.operationId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetOperationType()).compareTo(typedOther.isSetOperationType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperationType()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.operationType, typedOther.operationType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(typedOther.isSetHasResultSet());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHasResultSet()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, typedOther.hasResultSet);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetModifiedRowCount()).compareTo(typedOther.isSetModifiedRowCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetModifiedRowCount()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.modifiedRowCount, typedOther.modifiedRowCount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #3
0
 /** Performs a deep copy on <i>other</i>. */
 public TOperationHandle(TOperationHandle other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetOperationId()) {
     this.operationId = new THandleIdentifier(other.operationId);
   }
   if (other.isSetOperationType()) {
     this.operationType = other.operationType;
   }
   this.hasResultSet = other.hasResultSet;
   this.modifiedRowCount = other.modifiedRowCount;
 }