예제 #1
0
 /** Performs a deep copy on <i>other</i>. */
 public TGetOperationStatusResp(TGetOperationStatusResp other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetStatus()) {
     this.status = new TStatus(other.status);
   }
   if (other.isSetOperationState()) {
     this.operationState = other.operationState;
   }
   if (other.isSetSqlState()) {
     this.sqlState = other.sqlState;
   }
   this.errorCode = other.errorCode;
   if (other.isSetErrorMessage()) {
     this.errorMessage = other.errorMessage;
   }
 }
예제 #2
0
  public boolean equals(TGetOperationStatusResp that) {
    if (that == null) return false;

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status)) return false;
      if (!this.status.equals(that.status)) return false;
    }

    boolean this_present_operationState = true && this.isSetOperationState();
    boolean that_present_operationState = true && that.isSetOperationState();
    if (this_present_operationState || that_present_operationState) {
      if (!(this_present_operationState && that_present_operationState)) return false;
      if (!this.operationState.equals(that.operationState)) return false;
    }

    boolean this_present_sqlState = true && this.isSetSqlState();
    boolean that_present_sqlState = true && that.isSetSqlState();
    if (this_present_sqlState || that_present_sqlState) {
      if (!(this_present_sqlState && that_present_sqlState)) return false;
      if (!this.sqlState.equals(that.sqlState)) return false;
    }

    boolean this_present_errorCode = true && this.isSetErrorCode();
    boolean that_present_errorCode = true && that.isSetErrorCode();
    if (this_present_errorCode || that_present_errorCode) {
      if (!(this_present_errorCode && that_present_errorCode)) return false;
      if (this.errorCode != that.errorCode) return false;
    }

    boolean this_present_errorMessage = true && this.isSetErrorMessage();
    boolean that_present_errorMessage = true && that.isSetErrorMessage();
    if (this_present_errorMessage || that_present_errorMessage) {
      if (!(this_present_errorMessage && that_present_errorMessage)) return false;
      if (!this.errorMessage.equals(that.errorMessage)) return false;
    }

    return true;
  }
예제 #3
0
  @Override
  public int compareTo(TGetOperationStatusResp other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOperationState()).compareTo(other.isSetOperationState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperationState()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.operationState, other.operationState);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSqlState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetErrorCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetErrorMessage()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }