Пример #1
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, ResUpdateUserProfile struct)
        throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // ERROR
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.error = new ErrorDesc();
              struct.error.read(iprot);
              struct.setErrorIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
Пример #2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, ResUpdateUserProfile struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.error = new ErrorDesc();
     struct.error.read(iprot);
     struct.setErrorIsSet(true);
   }
 }
Пример #3
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, ResUpdateUserProfile struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetError()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetError()) {
     struct.error.write(oprot);
   }
 }
Пример #4
0
  public int compareTo(ResUpdateUserProfile other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetError()).compareTo(typedOther.isSetError());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetError()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, typedOther.error);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Пример #5
0
  public boolean equals(ResUpdateUserProfile that) {
    if (that == null) return false;

    boolean this_present_error = true && this.isSetError();
    boolean that_present_error = true && that.isSetError();
    if (this_present_error || that_present_error) {
      if (!(this_present_error && that_present_error)) return false;
      if (!this.error.equals(that.error)) return false;
    }

    return true;
  }
Пример #6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, ResUpdateUserProfile struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.error != null) {
        oprot.writeFieldBegin(ERROR_FIELD_DESC);
        struct.error.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Пример #7
0
 /** Performs a deep copy on <i>other</i>. */
 public ResUpdateUserProfile(ResUpdateUserProfile other) {
   if (other.isSetError()) {
     this.error = new ErrorDesc(other.error);
   }
 }