Ejemplo n.º 1
0
 public void read(org.apache.thrift.protocol.TProtocol prot, Location struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(3);
   if (incoming.get(0)) {
     struct.city = iprot.readString();
     struct.set_city_isSet(true);
   }
   if (incoming.get(1)) {
     struct.state = iprot.readString();
     struct.set_state_isSet(true);
   }
   if (incoming.get(2)) {
     struct.country = iprot.readString();
     struct.set_country_isSet(true);
   }
 }
Ejemplo n.º 2
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, Location 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: // CITY
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.city = iprot.readString();
           struct.set_city_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // STATE
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.state = iprot.readString();
           struct.set_state_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // COUNTRY
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.country = iprot.readString();
           struct.set_country_isSet(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();
   struct.validate();
 }