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