Exemple #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TableStore struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetTableNames()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetTableNames()) {
     {
       oprot.writeI32(struct.tableNames.size());
       for (String _iter4 : struct.tableNames) {
         oprot.writeString(_iter4);
       }
     }
   }
 }
Exemple #2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, TableStore struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     {
       org.apache.thrift.protocol.TList _list5 =
           new org.apache.thrift.protocol.TList(
               org.apache.thrift.protocol.TType.STRING, iprot.readI32());
       struct.tableNames = new ArrayList<String>(_list5.size);
       String _elem6;
       for (int _i7 = 0; _i7 < _list5.size; ++_i7) {
         _elem6 = iprot.readString();
         struct.tableNames.add(_elem6);
       }
     }
     struct.setTableNamesIsSet(true);
   }
 }
Exemple #3
0
  @Override
  public int compareTo(TableStore other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetTableNames()).compareTo(other.isSetTableNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableNames, other.tableNames);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Exemple #4
0
  public boolean equals(TableStore that) {
    if (that == null) return false;

    boolean this_present_tableNames = true && this.isSetTableNames();
    boolean that_present_tableNames = true && that.isSetTableNames();
    if (this_present_tableNames || that_present_tableNames) {
      if (!(this_present_tableNames && that_present_tableNames)) return false;
      if (!this.tableNames.equals(that.tableNames)) return false;
    }

    return true;
  }
Exemple #5
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, TableStore 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_NAMES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.tableNames = new ArrayList<String>(_list0.size);
                String _elem1;
                for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
                  _elem1 = iprot.readString();
                  struct.tableNames.add(_elem1);
                }
                iprot.readListEnd();
              }
              struct.setTableNamesIsSet(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();
    }
Exemple #6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TableStore struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.tableNames != null) {
        oprot.writeFieldBegin(TABLE_NAMES_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRING, struct.tableNames.size()));
          for (String _iter3 : struct.tableNames) {
            oprot.writeString(_iter3);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Exemple #7
0
 /** Performs a deep copy on <i>other</i>. */
 public TableStore(TableStore other) {
   if (other.isSetTableNames()) {
     List<String> __this__tableNames = new ArrayList<String>(other.tableNames);
     this.tableNames = __this__tableNames;
   }
 }