@Override public void read(org.apache.thrift.protocol.TProtocol prot, SelectQuery struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.operations = new ArrayList<SelectOperation>(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { SelectOperation _elem23; // required _elem23 = new SelectOperation(); _elem23.read(iprot); struct.operations.add(_elem23); } } struct.setOperationsIsSet(true); } if (incoming.get(1)) { struct.page = new Page(); struct.page.read(iprot); struct.setPageIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, SelectQuery 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: // OPERATIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list16 = iprot.readListBegin(); struct.operations = new ArrayList<SelectOperation>(_list16.size); for (int _i17 = 0; _i17 < _list16.size; ++_i17) { SelectOperation _elem18; // required _elem18 = new SelectOperation(); _elem18.read(iprot); struct.operations.add(_elem18); } iprot.readListEnd(); } struct.setOperationsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.page = new Page(); struct.page.read(iprot); struct.setPageIsSet(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(); }