public void read(org.apache.thrift.protocol.TProtocol iprot, UnaryPredicate 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: // PREDICATE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.predicateName = iprot.readString(); struct.setPredicateNameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // VALUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.values = new ArrayList<PredicateValue>(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { PredicateValue _elem2; _elem2 = new PredicateValue(); _elem2.read(iprot); struct.values.add(_elem2); } iprot.readListEnd(); } struct.setValuesIsSet(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(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, UnaryPredicate struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.predicateName = iprot.readString(); struct.setPredicateNameIsSet(true); { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.values = new ArrayList<PredicateValue>(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { PredicateValue _elem7; _elem7 = new PredicateValue(); _elem7.read(iprot); struct.values.add(_elem7); } } struct.setValuesIsSet(true); }