Example #1
0
      public void read(org.apache.thrift.protocol.TProtocol iprot, show_args 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: // USER
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.user = new User();
                struct.user.read(iprot);
                struct.setUserIsSet(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();
      }
Example #2
0
 public void write_args(org.apache.thrift.protocol.TProtocol prot)
     throws org.apache.thrift.TException {
   prot.writeMessageBegin(
       new org.apache.thrift.protocol.TMessage(
           "show", org.apache.thrift.protocol.TMessageType.CALL, 0));
   show_args args = new show_args();
   args.setUser(user);
   args.write(prot);
   prot.writeMessageEnd();
 }
Example #3
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, show_args struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.user = new User();
     struct.user.read(iprot);
     struct.setUserIsSet(true);
   }
 }
Example #4
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, show_args struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetUser()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetUser()) {
     struct.user.write(oprot);
   }
 }
Example #5
0
    @Override
    public int compareTo(show_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUser()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }
Example #6
0
    public boolean equals(show_args that) {
      if (that == null) return false;

      boolean this_present_user = true && this.isSetUser();
      boolean that_present_user = true && that.isSetUser();
      if (this_present_user || that_present_user) {
        if (!(this_present_user && that_present_user)) return false;
        if (!this.user.equals(that.user)) return false;
      }

      return true;
    }
Example #7
0
      public void write(org.apache.thrift.protocol.TProtocol oprot, show_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.user != null) {
          oprot.writeFieldBegin(USER_FIELD_DESC);
          struct.user.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
Example #8
0
 public void send_show(User user) throws org.apache.thrift.TException {
   show_args args = new show_args();
   args.setUser(user);
   sendBase("show", args);
 }
Example #9
0
 /** Performs a deep copy on <i>other</i>. */
 public show_args(show_args other) {
   if (other.isSetUser()) {
     this.user = new User(other.user);
   }
 }