Exemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, execute_result struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.is_set_success()) {
     optionals.set(0);
   }
   if (struct.is_set_e()) {
     optionals.set(1);
   }
   if (struct.is_set_aze()) {
     optionals.set(2);
   }
   oprot.writeBitSet(optionals, 3);
   if (struct.is_set_success()) {
     oprot.writeString(struct.success);
   }
   if (struct.is_set_e()) {
     struct.e.write(oprot);
   }
   if (struct.is_set_aze()) {
     struct.aze.write(oprot);
   }
 }
Exemplo n.º 2
0
    public boolean equals(execute_result that) {
      if (that == null) return false;

      boolean this_present_success = true && this.is_set_success();
      boolean that_present_success = true && that.is_set_success();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      boolean this_present_e = true && this.is_set_e();
      boolean that_present_e = true && that.is_set_e();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e)) return false;
        if (!this.e.equals(that.e)) return false;
      }

      boolean this_present_aze = true && this.is_set_aze();
      boolean that_present_aze = true && that.is_set_aze();
      if (this_present_aze || that_present_aze) {
        if (!(this_present_aze && that_present_aze)) return false;
        if (!this.aze.equals(that.aze)) return false;
      }

      return true;
    }
Exemplo n.º 3
0
 /** Performs a deep copy on <i>other</i>. */
 public execute_result(execute_result other) {
   if (other.is_set_success()) {
     this.success = other.success;
   }
   if (other.is_set_e()) {
     this.e = new DRPCExecutionException(other.e);
   }
   if (other.is_set_aze()) {
     this.aze = new AuthorizationException(other.aze);
   }
 }
Exemplo n.º 4
0
    @Override
    public int compareTo(execute_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (is_set_success()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(is_set_e()).compareTo(other.is_set_e());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (is_set_e()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (is_set_aze()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aze, other.aze);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }