コード例 #1
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, ClientRouteTableRequset 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: // TABLE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.tableName = iprot.readString();
              struct.setTableNameIsSet(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, ClientRouteTableRequset struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.tableName = iprot.readString();
     struct.setTableNameIsSet(true);
   }
 }
コード例 #3
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, ClientRouteTableRequset struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetTableName()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetTableName()) {
     oprot.writeString(struct.tableName);
   }
 }
コード例 #4
0
  @Override
  public int compareTo(ClientRouteTableRequset other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #5
0
  public boolean equals(ClientRouteTableRequset that) {
    if (that == null) return false;

    boolean this_present_tableName = true && this.isSetTableName();
    boolean that_present_tableName = true && that.isSetTableName();
    if (this_present_tableName || that_present_tableName) {
      if (!(this_present_tableName && that_present_tableName)) return false;
      if (!this.tableName.equals(that.tableName)) return false;
    }

    return true;
  }
コード例 #6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, ClientRouteTableRequset struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.tableName != null) {
        oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
        oprot.writeString(struct.tableName);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
コード例 #7
0
 /** Performs a deep copy on <i>other</i>. */
 public ClientRouteTableRequset(ClientRouteTableRequset other) {
   if (other.isSetTableName()) {
     this.tableName = other.tableName;
   }
 }