Exemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, Response struct)
     throws TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetResultType()) {
     optionals.set(0);
   }
   if (struct.isSetResult()) {
     optionals.set(1);
   }
   if (struct.isSetOperationId()) {
     optionals.set(2);
   }
   oprot.writeBitSet(optionals, 3);
   if (struct.isSetResultType()) {
     oprot.writeString(struct.ResultType);
   }
   if (struct.isSetResult()) {
     oprot.writeBinary(struct.Result);
   }
   if (struct.isSetOperationId()) {
     oprot.writeString(struct.OperationId);
   }
 }
Exemplo n.º 2
0
  public boolean equals(Response that) {
    if (that == null) return false;

    boolean this_present_ResultType = true && this.isSetResultType();
    boolean that_present_ResultType = true && that.isSetResultType();
    if (this_present_ResultType || that_present_ResultType) {
      if (!(this_present_ResultType && that_present_ResultType)) return false;
      if (!this.ResultType.equals(that.ResultType)) return false;
    }

    boolean this_present_Result = true && this.isSetResult();
    boolean that_present_Result = true && that.isSetResult();
    if (this_present_Result || that_present_Result) {
      if (!(this_present_Result && that_present_Result)) return false;
      if (!this.Result.equals(that.Result)) 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;
    }

    return true;
  }
Exemplo n.º 3
0
 /** Performs a deep copy on <i>other</i>. */
 public Response(Response other) {
   if (other.isSetResultType()) {
     this.ResultType = other.ResultType;
   }
   if (other.isSetResult()) {
     this.Result = org.apache.thrift.TBaseHelper.copyBinary(other.Result);
   }
   if (other.isSetOperationId()) {
     this.OperationId = other.OperationId;
   }
 }
Exemplo n.º 4
0
  @Override
  public int compareTo(Response other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetResultType()).compareTo(other.isSetResultType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResultType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ResultType, other.ResultType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResult()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Result, other.Result);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(other.isSetOperationId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperationId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.OperationId, other.OperationId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }