0001
0002
0003
0004
0005
0006
0007 package org.apache.hive.service.rpc.thrift;
0008
0009 import org.apache.thrift.scheme.IScheme;
0010 import org.apache.thrift.scheme.SchemeFactory;
0011 import org.apache.thrift.scheme.StandardScheme;
0012
0013 import org.apache.thrift.scheme.TupleScheme;
0014 import org.apache.thrift.protocol.TTupleProtocol;
0015 import org.apache.thrift.protocol.TProtocolException;
0016 import org.apache.thrift.EncodingUtils;
0017 import org.apache.thrift.TException;
0018 import org.apache.thrift.async.AsyncMethodCallback;
0019 import org.apache.thrift.server.AbstractNonblockingServer.*;
0020 import java.util.List;
0021 import java.util.ArrayList;
0022 import java.util.Map;
0023 import java.util.HashMap;
0024 import java.util.EnumMap;
0025 import java.util.Set;
0026 import java.util.HashSet;
0027 import java.util.EnumSet;
0028 import java.util.Collections;
0029 import java.util.BitSet;
0030 import java.nio.ByteBuffer;
0031 import java.util.Arrays;
0032 import javax.annotation.Generated;
0033 import org.slf4j.Logger;
0034 import org.slf4j.LoggerFactory;
0035
0036 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
0037 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
0038 public class TGetPrimaryKeysReq implements org.apache.thrift.TBase<TGetPrimaryKeysReq, TGetPrimaryKeysReq._Fields>, java.io.Serializable, Cloneable, Comparable<TGetPrimaryKeysReq> {
0039 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetPrimaryKeysReq");
0040
0041 private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1);
0042 private static final org.apache.thrift.protocol.TField CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogName", org.apache.thrift.protocol.TType.STRING, (short)2);
0043 private static final org.apache.thrift.protocol.TField SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("schemaName", org.apache.thrift.protocol.TType.STRING, (short)3);
0044 private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)4);
0045
0046 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
0047 static {
0048 schemes.put(StandardScheme.class, new TGetPrimaryKeysReqStandardSchemeFactory());
0049 schemes.put(TupleScheme.class, new TGetPrimaryKeysReqTupleSchemeFactory());
0050 }
0051
0052 private TSessionHandle sessionHandle;
0053 private String catalogName;
0054 private String schemaName;
0055 private String tableName;
0056
0057
0058 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0059 SESSION_HANDLE((short)1, "sessionHandle"),
0060 CATALOG_NAME((short)2, "catalogName"),
0061 SCHEMA_NAME((short)3, "schemaName"),
0062 TABLE_NAME((short)4, "tableName");
0063
0064 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0065
0066 static {
0067 for (_Fields field : EnumSet.allOf(_Fields.class)) {
0068 byName.put(field.getFieldName(), field);
0069 }
0070 }
0071
0072
0073
0074
0075 public static _Fields findByThriftId(int fieldId) {
0076 switch(fieldId) {
0077 case 1:
0078 return SESSION_HANDLE;
0079 case 2:
0080 return CATALOG_NAME;
0081 case 3:
0082 return SCHEMA_NAME;
0083 case 4:
0084 return TABLE_NAME;
0085 default:
0086 return null;
0087 }
0088 }
0089
0090
0091
0092
0093
0094 public static _Fields findByThriftIdOrThrow(int fieldId) {
0095 _Fields fields = findByThriftId(fieldId);
0096 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0097 return fields;
0098 }
0099
0100
0101
0102
0103 public static _Fields findByName(String name) {
0104 return byName.get(name);
0105 }
0106
0107 private final short _thriftId;
0108 private final String _fieldName;
0109
0110 _Fields(short thriftId, String fieldName) {
0111 _thriftId = thriftId;
0112 _fieldName = fieldName;
0113 }
0114
0115 public short getThriftFieldId() {
0116 return _thriftId;
0117 }
0118
0119 public String getFieldName() {
0120 return _fieldName;
0121 }
0122 }
0123
0124
0125 private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME};
0126 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0127 static {
0128 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0129 tmpMap.put(_Fields.SESSION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("sessionHandle", org.apache.thrift.TFieldRequirementType.REQUIRED,
0130 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class)));
0131 tmpMap.put(_Fields.CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("catalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
0132 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier")));
0133 tmpMap.put(_Fields.SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("schemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
0134 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier")));
0135 tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
0136 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier")));
0137 metaDataMap = Collections.unmodifiableMap(tmpMap);
0138 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetPrimaryKeysReq.class, metaDataMap);
0139 }
0140
0141 public TGetPrimaryKeysReq() {
0142 }
0143
0144 public TGetPrimaryKeysReq(
0145 TSessionHandle sessionHandle)
0146 {
0147 this();
0148 this.sessionHandle = sessionHandle;
0149 }
0150
0151
0152
0153
0154 public TGetPrimaryKeysReq(TGetPrimaryKeysReq other) {
0155 if (other.isSetSessionHandle()) {
0156 this.sessionHandle = new TSessionHandle(other.sessionHandle);
0157 }
0158 if (other.isSetCatalogName()) {
0159 this.catalogName = other.catalogName;
0160 }
0161 if (other.isSetSchemaName()) {
0162 this.schemaName = other.schemaName;
0163 }
0164 if (other.isSetTableName()) {
0165 this.tableName = other.tableName;
0166 }
0167 }
0168
0169 public TGetPrimaryKeysReq deepCopy() {
0170 return new TGetPrimaryKeysReq(this);
0171 }
0172
0173 @Override
0174 public void clear() {
0175 this.sessionHandle = null;
0176 this.catalogName = null;
0177 this.schemaName = null;
0178 this.tableName = null;
0179 }
0180
0181 public TSessionHandle getSessionHandle() {
0182 return this.sessionHandle;
0183 }
0184
0185 public void setSessionHandle(TSessionHandle sessionHandle) {
0186 this.sessionHandle = sessionHandle;
0187 }
0188
0189 public void unsetSessionHandle() {
0190 this.sessionHandle = null;
0191 }
0192
0193
0194 public boolean isSetSessionHandle() {
0195 return this.sessionHandle != null;
0196 }
0197
0198 public void setSessionHandleIsSet(boolean value) {
0199 if (!value) {
0200 this.sessionHandle = null;
0201 }
0202 }
0203
0204 public String getCatalogName() {
0205 return this.catalogName;
0206 }
0207
0208 public void setCatalogName(String catalogName) {
0209 this.catalogName = catalogName;
0210 }
0211
0212 public void unsetCatalogName() {
0213 this.catalogName = null;
0214 }
0215
0216
0217 public boolean isSetCatalogName() {
0218 return this.catalogName != null;
0219 }
0220
0221 public void setCatalogNameIsSet(boolean value) {
0222 if (!value) {
0223 this.catalogName = null;
0224 }
0225 }
0226
0227 public String getSchemaName() {
0228 return this.schemaName;
0229 }
0230
0231 public void setSchemaName(String schemaName) {
0232 this.schemaName = schemaName;
0233 }
0234
0235 public void unsetSchemaName() {
0236 this.schemaName = null;
0237 }
0238
0239
0240 public boolean isSetSchemaName() {
0241 return this.schemaName != null;
0242 }
0243
0244 public void setSchemaNameIsSet(boolean value) {
0245 if (!value) {
0246 this.schemaName = null;
0247 }
0248 }
0249
0250 public String getTableName() {
0251 return this.tableName;
0252 }
0253
0254 public void setTableName(String tableName) {
0255 this.tableName = tableName;
0256 }
0257
0258 public void unsetTableName() {
0259 this.tableName = null;
0260 }
0261
0262
0263 public boolean isSetTableName() {
0264 return this.tableName != null;
0265 }
0266
0267 public void setTableNameIsSet(boolean value) {
0268 if (!value) {
0269 this.tableName = null;
0270 }
0271 }
0272
0273 public void setFieldValue(_Fields field, Object value) {
0274 switch (field) {
0275 case SESSION_HANDLE:
0276 if (value == null) {
0277 unsetSessionHandle();
0278 } else {
0279 setSessionHandle((TSessionHandle)value);
0280 }
0281 break;
0282
0283 case CATALOG_NAME:
0284 if (value == null) {
0285 unsetCatalogName();
0286 } else {
0287 setCatalogName((String)value);
0288 }
0289 break;
0290
0291 case SCHEMA_NAME:
0292 if (value == null) {
0293 unsetSchemaName();
0294 } else {
0295 setSchemaName((String)value);
0296 }
0297 break;
0298
0299 case TABLE_NAME:
0300 if (value == null) {
0301 unsetTableName();
0302 } else {
0303 setTableName((String)value);
0304 }
0305 break;
0306
0307 }
0308 }
0309
0310 public Object getFieldValue(_Fields field) {
0311 switch (field) {
0312 case SESSION_HANDLE:
0313 return getSessionHandle();
0314
0315 case CATALOG_NAME:
0316 return getCatalogName();
0317
0318 case SCHEMA_NAME:
0319 return getSchemaName();
0320
0321 case TABLE_NAME:
0322 return getTableName();
0323
0324 }
0325 throw new IllegalStateException();
0326 }
0327
0328
0329 public boolean isSet(_Fields field) {
0330 if (field == null) {
0331 throw new IllegalArgumentException();
0332 }
0333
0334 switch (field) {
0335 case SESSION_HANDLE:
0336 return isSetSessionHandle();
0337 case CATALOG_NAME:
0338 return isSetCatalogName();
0339 case SCHEMA_NAME:
0340 return isSetSchemaName();
0341 case TABLE_NAME:
0342 return isSetTableName();
0343 }
0344 throw new IllegalStateException();
0345 }
0346
0347 @Override
0348 public boolean equals(Object that) {
0349 if (that == null)
0350 return false;
0351 if (that instanceof TGetPrimaryKeysReq)
0352 return this.equals((TGetPrimaryKeysReq)that);
0353 return false;
0354 }
0355
0356 public boolean equals(TGetPrimaryKeysReq that) {
0357 if (that == null)
0358 return false;
0359
0360 boolean this_present_sessionHandle = true && this.isSetSessionHandle();
0361 boolean that_present_sessionHandle = true && that.isSetSessionHandle();
0362 if (this_present_sessionHandle || that_present_sessionHandle) {
0363 if (!(this_present_sessionHandle && that_present_sessionHandle))
0364 return false;
0365 if (!this.sessionHandle.equals(that.sessionHandle))
0366 return false;
0367 }
0368
0369 boolean this_present_catalogName = true && this.isSetCatalogName();
0370 boolean that_present_catalogName = true && that.isSetCatalogName();
0371 if (this_present_catalogName || that_present_catalogName) {
0372 if (!(this_present_catalogName && that_present_catalogName))
0373 return false;
0374 if (!this.catalogName.equals(that.catalogName))
0375 return false;
0376 }
0377
0378 boolean this_present_schemaName = true && this.isSetSchemaName();
0379 boolean that_present_schemaName = true && that.isSetSchemaName();
0380 if (this_present_schemaName || that_present_schemaName) {
0381 if (!(this_present_schemaName && that_present_schemaName))
0382 return false;
0383 if (!this.schemaName.equals(that.schemaName))
0384 return false;
0385 }
0386
0387 boolean this_present_tableName = true && this.isSetTableName();
0388 boolean that_present_tableName = true && that.isSetTableName();
0389 if (this_present_tableName || that_present_tableName) {
0390 if (!(this_present_tableName && that_present_tableName))
0391 return false;
0392 if (!this.tableName.equals(that.tableName))
0393 return false;
0394 }
0395
0396 return true;
0397 }
0398
0399 @Override
0400 public int hashCode() {
0401 List<Object> list = new ArrayList<Object>();
0402
0403 boolean present_sessionHandle = true && (isSetSessionHandle());
0404 list.add(present_sessionHandle);
0405 if (present_sessionHandle)
0406 list.add(sessionHandle);
0407
0408 boolean present_catalogName = true && (isSetCatalogName());
0409 list.add(present_catalogName);
0410 if (present_catalogName)
0411 list.add(catalogName);
0412
0413 boolean present_schemaName = true && (isSetSchemaName());
0414 list.add(present_schemaName);
0415 if (present_schemaName)
0416 list.add(schemaName);
0417
0418 boolean present_tableName = true && (isSetTableName());
0419 list.add(present_tableName);
0420 if (present_tableName)
0421 list.add(tableName);
0422
0423 return list.hashCode();
0424 }
0425
0426 @Override
0427 public int compareTo(TGetPrimaryKeysReq other) {
0428 if (!getClass().equals(other.getClass())) {
0429 return getClass().getName().compareTo(other.getClass().getName());
0430 }
0431
0432 int lastComparison = 0;
0433
0434 lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle());
0435 if (lastComparison != 0) {
0436 return lastComparison;
0437 }
0438 if (isSetSessionHandle()) {
0439 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle);
0440 if (lastComparison != 0) {
0441 return lastComparison;
0442 }
0443 }
0444 lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName());
0445 if (lastComparison != 0) {
0446 return lastComparison;
0447 }
0448 if (isSetCatalogName()) {
0449 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName);
0450 if (lastComparison != 0) {
0451 return lastComparison;
0452 }
0453 }
0454 lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName());
0455 if (lastComparison != 0) {
0456 return lastComparison;
0457 }
0458 if (isSetSchemaName()) {
0459 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName);
0460 if (lastComparison != 0) {
0461 return lastComparison;
0462 }
0463 }
0464 lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
0465 if (lastComparison != 0) {
0466 return lastComparison;
0467 }
0468 if (isSetTableName()) {
0469 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
0470 if (lastComparison != 0) {
0471 return lastComparison;
0472 }
0473 }
0474 return 0;
0475 }
0476
0477 public _Fields fieldForId(int fieldId) {
0478 return _Fields.findByThriftId(fieldId);
0479 }
0480
0481 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
0482 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
0483 }
0484
0485 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0486 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
0487 }
0488
0489 @Override
0490 public String toString() {
0491 StringBuilder sb = new StringBuilder("TGetPrimaryKeysReq(");
0492 boolean first = true;
0493
0494 sb.append("sessionHandle:");
0495 if (this.sessionHandle == null) {
0496 sb.append("null");
0497 } else {
0498 sb.append(this.sessionHandle);
0499 }
0500 first = false;
0501 if (isSetCatalogName()) {
0502 if (!first) sb.append(", ");
0503 sb.append("catalogName:");
0504 if (this.catalogName == null) {
0505 sb.append("null");
0506 } else {
0507 sb.append(this.catalogName);
0508 }
0509 first = false;
0510 }
0511 if (isSetSchemaName()) {
0512 if (!first) sb.append(", ");
0513 sb.append("schemaName:");
0514 if (this.schemaName == null) {
0515 sb.append("null");
0516 } else {
0517 sb.append(this.schemaName);
0518 }
0519 first = false;
0520 }
0521 if (isSetTableName()) {
0522 if (!first) sb.append(", ");
0523 sb.append("tableName:");
0524 if (this.tableName == null) {
0525 sb.append("null");
0526 } else {
0527 sb.append(this.tableName);
0528 }
0529 first = false;
0530 }
0531 sb.append(")");
0532 return sb.toString();
0533 }
0534
0535 public void validate() throws org.apache.thrift.TException {
0536
0537 if (!isSetSessionHandle()) {
0538 throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString());
0539 }
0540
0541
0542 if (sessionHandle != null) {
0543 sessionHandle.validate();
0544 }
0545 }
0546
0547 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0548 try {
0549 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0550 } catch (org.apache.thrift.TException te) {
0551 throw new java.io.IOException(te);
0552 }
0553 }
0554
0555 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0556 try {
0557 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0558 } catch (org.apache.thrift.TException te) {
0559 throw new java.io.IOException(te);
0560 }
0561 }
0562
0563 private static class TGetPrimaryKeysReqStandardSchemeFactory implements SchemeFactory {
0564 public TGetPrimaryKeysReqStandardScheme getScheme() {
0565 return new TGetPrimaryKeysReqStandardScheme();
0566 }
0567 }
0568
0569 private static class TGetPrimaryKeysReqStandardScheme extends StandardScheme<TGetPrimaryKeysReq> {
0570
0571 public void read(org.apache.thrift.protocol.TProtocol iprot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException {
0572 org.apache.thrift.protocol.TField schemeField;
0573 iprot.readStructBegin();
0574 while (true)
0575 {
0576 schemeField = iprot.readFieldBegin();
0577 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
0578 break;
0579 }
0580 switch (schemeField.id) {
0581 case 1:
0582 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
0583 struct.sessionHandle = new TSessionHandle();
0584 struct.sessionHandle.read(iprot);
0585 struct.setSessionHandleIsSet(true);
0586 } else {
0587 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0588 }
0589 break;
0590 case 2:
0591 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0592 struct.catalogName = iprot.readString();
0593 struct.setCatalogNameIsSet(true);
0594 } else {
0595 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0596 }
0597 break;
0598 case 3:
0599 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0600 struct.schemaName = iprot.readString();
0601 struct.setSchemaNameIsSet(true);
0602 } else {
0603 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0604 }
0605 break;
0606 case 4:
0607 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0608 struct.tableName = iprot.readString();
0609 struct.setTableNameIsSet(true);
0610 } else {
0611 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0612 }
0613 break;
0614 default:
0615 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0616 }
0617 iprot.readFieldEnd();
0618 }
0619 iprot.readStructEnd();
0620 struct.validate();
0621 }
0622
0623 public void write(org.apache.thrift.protocol.TProtocol oprot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException {
0624 struct.validate();
0625
0626 oprot.writeStructBegin(STRUCT_DESC);
0627 if (struct.sessionHandle != null) {
0628 oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC);
0629 struct.sessionHandle.write(oprot);
0630 oprot.writeFieldEnd();
0631 }
0632 if (struct.catalogName != null) {
0633 if (struct.isSetCatalogName()) {
0634 oprot.writeFieldBegin(CATALOG_NAME_FIELD_DESC);
0635 oprot.writeString(struct.catalogName);
0636 oprot.writeFieldEnd();
0637 }
0638 }
0639 if (struct.schemaName != null) {
0640 if (struct.isSetSchemaName()) {
0641 oprot.writeFieldBegin(SCHEMA_NAME_FIELD_DESC);
0642 oprot.writeString(struct.schemaName);
0643 oprot.writeFieldEnd();
0644 }
0645 }
0646 if (struct.tableName != null) {
0647 if (struct.isSetTableName()) {
0648 oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
0649 oprot.writeString(struct.tableName);
0650 oprot.writeFieldEnd();
0651 }
0652 }
0653 oprot.writeFieldStop();
0654 oprot.writeStructEnd();
0655 }
0656
0657 }
0658
0659 private static class TGetPrimaryKeysReqTupleSchemeFactory implements SchemeFactory {
0660 public TGetPrimaryKeysReqTupleScheme getScheme() {
0661 return new TGetPrimaryKeysReqTupleScheme();
0662 }
0663 }
0664
0665 private static class TGetPrimaryKeysReqTupleScheme extends TupleScheme<TGetPrimaryKeysReq> {
0666
0667 @Override
0668 public void write(org.apache.thrift.protocol.TProtocol prot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException {
0669 TTupleProtocol oprot = (TTupleProtocol) prot;
0670 struct.sessionHandle.write(oprot);
0671 BitSet optionals = new BitSet();
0672 if (struct.isSetCatalogName()) {
0673 optionals.set(0);
0674 }
0675 if (struct.isSetSchemaName()) {
0676 optionals.set(1);
0677 }
0678 if (struct.isSetTableName()) {
0679 optionals.set(2);
0680 }
0681 oprot.writeBitSet(optionals, 3);
0682 if (struct.isSetCatalogName()) {
0683 oprot.writeString(struct.catalogName);
0684 }
0685 if (struct.isSetSchemaName()) {
0686 oprot.writeString(struct.schemaName);
0687 }
0688 if (struct.isSetTableName()) {
0689 oprot.writeString(struct.tableName);
0690 }
0691 }
0692
0693 @Override
0694 public void read(org.apache.thrift.protocol.TProtocol prot, TGetPrimaryKeysReq struct) throws org.apache.thrift.TException {
0695 TTupleProtocol iprot = (TTupleProtocol) prot;
0696 struct.sessionHandle = new TSessionHandle();
0697 struct.sessionHandle.read(iprot);
0698 struct.setSessionHandleIsSet(true);
0699 BitSet incoming = iprot.readBitSet(3);
0700 if (incoming.get(0)) {
0701 struct.catalogName = iprot.readString();
0702 struct.setCatalogNameIsSet(true);
0703 }
0704 if (incoming.get(1)) {
0705 struct.schemaName = iprot.readString();
0706 struct.setSchemaNameIsSet(true);
0707 }
0708 if (incoming.get(2)) {
0709 struct.tableName = iprot.readString();
0710 struct.setTableNameIsSet(true);
0711 }
0712 }
0713 }
0714
0715 }
0716