1
2
3
4
5
6
7 package org.apache.hadoop.hbase.thrift2.generated;
8
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
12
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import org.apache.thrift.protocol.TProtocolException;
16 import org.apache.thrift.EncodingUtils;
17 import org.apache.thrift.TException;
18 import java.util.List;
19 import java.util.ArrayList;
20 import java.util.Map;
21 import java.util.HashMap;
22 import java.util.EnumMap;
23 import java.util.Set;
24 import java.util.HashSet;
25 import java.util.EnumSet;
26 import java.util.Collections;
27 import java.util.BitSet;
28 import java.nio.ByteBuffer;
29 import java.util.Arrays;
30 import org.slf4j.Logger;
31 import org.slf4j.LoggerFactory;
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable, Cloneable {
49 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet");
50
51 private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
52 private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2);
53 private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
54 private static final org.apache.thrift.protocol.TField TIME_RANGE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeRange", org.apache.thrift.protocol.TType.STRUCT, (short)4);
55 private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)5);
56
57 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
58 static {
59 schemes.put(StandardScheme.class, new TGetStandardSchemeFactory());
60 schemes.put(TupleScheme.class, new TGetTupleSchemeFactory());
61 }
62
63 public ByteBuffer row;
64 public List<TColumn> columns;
65 public long timestamp;
66 public TTimeRange timeRange;
67 public int maxVersions;
68
69
70 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
71 ROW((short)1, "row"),
72 COLUMNS((short)2, "columns"),
73 TIMESTAMP((short)3, "timestamp"),
74 TIME_RANGE((short)4, "timeRange"),
75 MAX_VERSIONS((short)5, "maxVersions");
76
77 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
78
79 static {
80 for (_Fields field : EnumSet.allOf(_Fields.class)) {
81 byName.put(field.getFieldName(), field);
82 }
83 }
84
85
86
87
88 public static _Fields findByThriftId(int fieldId) {
89 switch(fieldId) {
90 case 1:
91 return ROW;
92 case 2:
93 return COLUMNS;
94 case 3:
95 return TIMESTAMP;
96 case 4:
97 return TIME_RANGE;
98 case 5:
99 return MAX_VERSIONS;
100 default:
101 return null;
102 }
103 }
104
105
106
107
108
109 public static _Fields findByThriftIdOrThrow(int fieldId) {
110 _Fields fields = findByThriftId(fieldId);
111 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
112 return fields;
113 }
114
115
116
117
118 public static _Fields findByName(String name) {
119 return byName.get(name);
120 }
121
122 private final short _thriftId;
123 private final String _fieldName;
124
125 _Fields(short thriftId, String fieldName) {
126 _thriftId = thriftId;
127 _fieldName = fieldName;
128 }
129
130 public short getThriftFieldId() {
131 return _thriftId;
132 }
133
134 public String getFieldName() {
135 return _fieldName;
136 }
137 }
138
139
140 private static final int __TIMESTAMP_ISSET_ID = 0;
141 private static final int __MAXVERSIONS_ISSET_ID = 1;
142 private byte __isset_bitfield = 0;
143 private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS};
144 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
145 static {
146 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
147 tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
148 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
149 tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
150 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
151 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class))));
152 tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
153 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
154 tmpMap.put(_Fields.TIME_RANGE, new org.apache.thrift.meta_data.FieldMetaData("timeRange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
155 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTimeRange.class)));
156 tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
157 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
158 metaDataMap = Collections.unmodifiableMap(tmpMap);
159 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap);
160 }
161
162 public TGet() {
163 }
164
165 public TGet(
166 ByteBuffer row)
167 {
168 this();
169 this.row = row;
170 }
171
172
173
174
175 public TGet(TGet other) {
176 __isset_bitfield = other.__isset_bitfield;
177 if (other.isSetRow()) {
178 this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
179 ;
180 }
181 if (other.isSetColumns()) {
182 List<TColumn> __this__columns = new ArrayList<TColumn>();
183 for (TColumn other_element : other.columns) {
184 __this__columns.add(new TColumn(other_element));
185 }
186 this.columns = __this__columns;
187 }
188 this.timestamp = other.timestamp;
189 if (other.isSetTimeRange()) {
190 this.timeRange = new TTimeRange(other.timeRange);
191 }
192 this.maxVersions = other.maxVersions;
193 }
194
195 public TGet deepCopy() {
196 return new TGet(this);
197 }
198
199 @Override
200 public void clear() {
201 this.row = null;
202 this.columns = null;
203 setTimestampIsSet(false);
204 this.timestamp = 0;
205 this.timeRange = null;
206 setMaxVersionsIsSet(false);
207 this.maxVersions = 0;
208 }
209
210 public byte[] getRow() {
211 setRow(org.apache.thrift.TBaseHelper.rightSize(row));
212 return row == null ? null : row.array();
213 }
214
215 public ByteBuffer bufferForRow() {
216 return row;
217 }
218
219 public TGet setRow(byte[] row) {
220 setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
221 return this;
222 }
223
224 public TGet setRow(ByteBuffer row) {
225 this.row = row;
226 return this;
227 }
228
229 public void unsetRow() {
230 this.row = null;
231 }
232
233
234 public boolean isSetRow() {
235 return this.row != null;
236 }
237
238 public void setRowIsSet(boolean value) {
239 if (!value) {
240 this.row = null;
241 }
242 }
243
244 public int getColumnsSize() {
245 return (this.columns == null) ? 0 : this.columns.size();
246 }
247
248 public java.util.Iterator<TColumn> getColumnsIterator() {
249 return (this.columns == null) ? null : this.columns.iterator();
250 }
251
252 public void addToColumns(TColumn elem) {
253 if (this.columns == null) {
254 this.columns = new ArrayList<TColumn>();
255 }
256 this.columns.add(elem);
257 }
258
259 public List<TColumn> getColumns() {
260 return this.columns;
261 }
262
263 public TGet setColumns(List<TColumn> columns) {
264 this.columns = columns;
265 return this;
266 }
267
268 public void unsetColumns() {
269 this.columns = null;
270 }
271
272
273 public boolean isSetColumns() {
274 return this.columns != null;
275 }
276
277 public void setColumnsIsSet(boolean value) {
278 if (!value) {
279 this.columns = null;
280 }
281 }
282
283 public long getTimestamp() {
284 return this.timestamp;
285 }
286
287 public TGet setTimestamp(long timestamp) {
288 this.timestamp = timestamp;
289 setTimestampIsSet(true);
290 return this;
291 }
292
293 public void unsetTimestamp() {
294 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
295 }
296
297
298 public boolean isSetTimestamp() {
299 return EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
300 }
301
302 public void setTimestampIsSet(boolean value) {
303 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
304 }
305
306 public TTimeRange getTimeRange() {
307 return this.timeRange;
308 }
309
310 public TGet setTimeRange(TTimeRange timeRange) {
311 this.timeRange = timeRange;
312 return this;
313 }
314
315 public void unsetTimeRange() {
316 this.timeRange = null;
317 }
318
319
320 public boolean isSetTimeRange() {
321 return this.timeRange != null;
322 }
323
324 public void setTimeRangeIsSet(boolean value) {
325 if (!value) {
326 this.timeRange = null;
327 }
328 }
329
330 public int getMaxVersions() {
331 return this.maxVersions;
332 }
333
334 public TGet setMaxVersions(int maxVersions) {
335 this.maxVersions = maxVersions;
336 setMaxVersionsIsSet(true);
337 return this;
338 }
339
340 public void unsetMaxVersions() {
341 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID);
342 }
343
344
345 public boolean isSetMaxVersions() {
346 return EncodingUtils.testBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID);
347 }
348
349 public void setMaxVersionsIsSet(boolean value) {
350 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXVERSIONS_ISSET_ID, value);
351 }
352
353 public void setFieldValue(_Fields field, Object value) {
354 switch (field) {
355 case ROW:
356 if (value == null) {
357 unsetRow();
358 } else {
359 setRow((ByteBuffer)value);
360 }
361 break;
362
363 case COLUMNS:
364 if (value == null) {
365 unsetColumns();
366 } else {
367 setColumns((List<TColumn>)value);
368 }
369 break;
370
371 case TIMESTAMP:
372 if (value == null) {
373 unsetTimestamp();
374 } else {
375 setTimestamp((Long)value);
376 }
377 break;
378
379 case TIME_RANGE:
380 if (value == null) {
381 unsetTimeRange();
382 } else {
383 setTimeRange((TTimeRange)value);
384 }
385 break;
386
387 case MAX_VERSIONS:
388 if (value == null) {
389 unsetMaxVersions();
390 } else {
391 setMaxVersions((Integer)value);
392 }
393 break;
394
395 }
396 }
397
398 public Object getFieldValue(_Fields field) {
399 switch (field) {
400 case ROW:
401 return getRow();
402
403 case COLUMNS:
404 return getColumns();
405
406 case TIMESTAMP:
407 return Long.valueOf(getTimestamp());
408
409 case TIME_RANGE:
410 return getTimeRange();
411
412 case MAX_VERSIONS:
413 return Integer.valueOf(getMaxVersions());
414
415 }
416 throw new IllegalStateException();
417 }
418
419
420 public boolean isSet(_Fields field) {
421 if (field == null) {
422 throw new IllegalArgumentException();
423 }
424
425 switch (field) {
426 case ROW:
427 return isSetRow();
428 case COLUMNS:
429 return isSetColumns();
430 case TIMESTAMP:
431 return isSetTimestamp();
432 case TIME_RANGE:
433 return isSetTimeRange();
434 case MAX_VERSIONS:
435 return isSetMaxVersions();
436 }
437 throw new IllegalStateException();
438 }
439
440 @Override
441 public boolean equals(Object that) {
442 if (that == null)
443 return false;
444 if (that instanceof TGet)
445 return this.equals((TGet)that);
446 return false;
447 }
448
449 public boolean equals(TGet that) {
450 if (that == null)
451 return false;
452
453 boolean this_present_row = true && this.isSetRow();
454 boolean that_present_row = true && that.isSetRow();
455 if (this_present_row || that_present_row) {
456 if (!(this_present_row && that_present_row))
457 return false;
458 if (!this.row.equals(that.row))
459 return false;
460 }
461
462 boolean this_present_columns = true && this.isSetColumns();
463 boolean that_present_columns = true && that.isSetColumns();
464 if (this_present_columns || that_present_columns) {
465 if (!(this_present_columns && that_present_columns))
466 return false;
467 if (!this.columns.equals(that.columns))
468 return false;
469 }
470
471 boolean this_present_timestamp = true && this.isSetTimestamp();
472 boolean that_present_timestamp = true && that.isSetTimestamp();
473 if (this_present_timestamp || that_present_timestamp) {
474 if (!(this_present_timestamp && that_present_timestamp))
475 return false;
476 if (this.timestamp != that.timestamp)
477 return false;
478 }
479
480 boolean this_present_timeRange = true && this.isSetTimeRange();
481 boolean that_present_timeRange = true && that.isSetTimeRange();
482 if (this_present_timeRange || that_present_timeRange) {
483 if (!(this_present_timeRange && that_present_timeRange))
484 return false;
485 if (!this.timeRange.equals(that.timeRange))
486 return false;
487 }
488
489 boolean this_present_maxVersions = true && this.isSetMaxVersions();
490 boolean that_present_maxVersions = true && that.isSetMaxVersions();
491 if (this_present_maxVersions || that_present_maxVersions) {
492 if (!(this_present_maxVersions && that_present_maxVersions))
493 return false;
494 if (this.maxVersions != that.maxVersions)
495 return false;
496 }
497
498 return true;
499 }
500
501 @Override
502 public int hashCode() {
503 return 0;
504 }
505
506 public int compareTo(TGet other) {
507 if (!getClass().equals(other.getClass())) {
508 return getClass().getName().compareTo(other.getClass().getName());
509 }
510
511 int lastComparison = 0;
512 TGet typedOther = (TGet)other;
513
514 lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
515 if (lastComparison != 0) {
516 return lastComparison;
517 }
518 if (isSetRow()) {
519 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
520 if (lastComparison != 0) {
521 return lastComparison;
522 }
523 }
524 lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
525 if (lastComparison != 0) {
526 return lastComparison;
527 }
528 if (isSetColumns()) {
529 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
530 if (lastComparison != 0) {
531 return lastComparison;
532 }
533 }
534 lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
535 if (lastComparison != 0) {
536 return lastComparison;
537 }
538 if (isSetTimestamp()) {
539 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
540 if (lastComparison != 0) {
541 return lastComparison;
542 }
543 }
544 lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
545 if (lastComparison != 0) {
546 return lastComparison;
547 }
548 if (isSetTimeRange()) {
549 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
550 if (lastComparison != 0) {
551 return lastComparison;
552 }
553 }
554 lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
555 if (lastComparison != 0) {
556 return lastComparison;
557 }
558 if (isSetMaxVersions()) {
559 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
560 if (lastComparison != 0) {
561 return lastComparison;
562 }
563 }
564 return 0;
565 }
566
567 public _Fields fieldForId(int fieldId) {
568 return _Fields.findByThriftId(fieldId);
569 }
570
571 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
572 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
573 }
574
575 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
576 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
577 }
578
579 @Override
580 public String toString() {
581 StringBuilder sb = new StringBuilder("TGet(");
582 boolean first = true;
583
584 sb.append("row:");
585 if (this.row == null) {
586 sb.append("null");
587 } else {
588 org.apache.thrift.TBaseHelper.toString(this.row, sb);
589 }
590 first = false;
591 if (isSetColumns()) {
592 if (!first) sb.append(", ");
593 sb.append("columns:");
594 if (this.columns == null) {
595 sb.append("null");
596 } else {
597 sb.append(this.columns);
598 }
599 first = false;
600 }
601 if (isSetTimestamp()) {
602 if (!first) sb.append(", ");
603 sb.append("timestamp:");
604 sb.append(this.timestamp);
605 first = false;
606 }
607 if (isSetTimeRange()) {
608 if (!first) sb.append(", ");
609 sb.append("timeRange:");
610 if (this.timeRange == null) {
611 sb.append("null");
612 } else {
613 sb.append(this.timeRange);
614 }
615 first = false;
616 }
617 if (isSetMaxVersions()) {
618 if (!first) sb.append(", ");
619 sb.append("maxVersions:");
620 sb.append(this.maxVersions);
621 first = false;
622 }
623 sb.append(")");
624 return sb.toString();
625 }
626
627 public void validate() throws org.apache.thrift.TException {
628
629 if (row == null) {
630 throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
631 }
632
633 if (timeRange != null) {
634 timeRange.validate();
635 }
636 }
637
638 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
639 try {
640 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
641 } catch (org.apache.thrift.TException te) {
642 throw new java.io.IOException(te);
643 }
644 }
645
646 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
647 try {
648
649 __isset_bitfield = 0;
650 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
651 } catch (org.apache.thrift.TException te) {
652 throw new java.io.IOException(te);
653 }
654 }
655
656 private static class TGetStandardSchemeFactory implements SchemeFactory {
657 public TGetStandardScheme getScheme() {
658 return new TGetStandardScheme();
659 }
660 }
661
662 private static class TGetStandardScheme extends StandardScheme<TGet> {
663
664 public void read(org.apache.thrift.protocol.TProtocol iprot, TGet struct) throws org.apache.thrift.TException {
665 org.apache.thrift.protocol.TField schemeField;
666 iprot.readStructBegin();
667 while (true)
668 {
669 schemeField = iprot.readFieldBegin();
670 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
671 break;
672 }
673 switch (schemeField.id) {
674 case 1:
675 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
676 struct.row = iprot.readBinary();
677 struct.setRowIsSet(true);
678 } else {
679 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
680 }
681 break;
682 case 2:
683 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
684 {
685 org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
686 struct.columns = new ArrayList<TColumn>(_list8.size);
687 for (int _i9 = 0; _i9 < _list8.size; ++_i9)
688 {
689 TColumn _elem10;
690 _elem10 = new TColumn();
691 _elem10.read(iprot);
692 struct.columns.add(_elem10);
693 }
694 iprot.readListEnd();
695 }
696 struct.setColumnsIsSet(true);
697 } else {
698 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
699 }
700 break;
701 case 3:
702 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
703 struct.timestamp = iprot.readI64();
704 struct.setTimestampIsSet(true);
705 } else {
706 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
707 }
708 break;
709 case 4:
710 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
711 struct.timeRange = new TTimeRange();
712 struct.timeRange.read(iprot);
713 struct.setTimeRangeIsSet(true);
714 } else {
715 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
716 }
717 break;
718 case 5:
719 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
720 struct.maxVersions = iprot.readI32();
721 struct.setMaxVersionsIsSet(true);
722 } else {
723 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
724 }
725 break;
726 default:
727 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
728 }
729 iprot.readFieldEnd();
730 }
731 iprot.readStructEnd();
732
733
734 struct.validate();
735 }
736
737 public void write(org.apache.thrift.protocol.TProtocol oprot, TGet struct) throws org.apache.thrift.TException {
738 struct.validate();
739
740 oprot.writeStructBegin(STRUCT_DESC);
741 if (struct.row != null) {
742 oprot.writeFieldBegin(ROW_FIELD_DESC);
743 oprot.writeBinary(struct.row);
744 oprot.writeFieldEnd();
745 }
746 if (struct.columns != null) {
747 if (struct.isSetColumns()) {
748 oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
749 {
750 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
751 for (TColumn _iter11 : struct.columns)
752 {
753 _iter11.write(oprot);
754 }
755 oprot.writeListEnd();
756 }
757 oprot.writeFieldEnd();
758 }
759 }
760 if (struct.isSetTimestamp()) {
761 oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
762 oprot.writeI64(struct.timestamp);
763 oprot.writeFieldEnd();
764 }
765 if (struct.timeRange != null) {
766 if (struct.isSetTimeRange()) {
767 oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
768 struct.timeRange.write(oprot);
769 oprot.writeFieldEnd();
770 }
771 }
772 if (struct.isSetMaxVersions()) {
773 oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
774 oprot.writeI32(struct.maxVersions);
775 oprot.writeFieldEnd();
776 }
777 oprot.writeFieldStop();
778 oprot.writeStructEnd();
779 }
780
781 }
782
783 private static class TGetTupleSchemeFactory implements SchemeFactory {
784 public TGetTupleScheme getScheme() {
785 return new TGetTupleScheme();
786 }
787 }
788
789 private static class TGetTupleScheme extends TupleScheme<TGet> {
790
791 @Override
792 public void write(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException {
793 TTupleProtocol oprot = (TTupleProtocol) prot;
794 oprot.writeBinary(struct.row);
795 BitSet optionals = new BitSet();
796 if (struct.isSetColumns()) {
797 optionals.set(0);
798 }
799 if (struct.isSetTimestamp()) {
800 optionals.set(1);
801 }
802 if (struct.isSetTimeRange()) {
803 optionals.set(2);
804 }
805 if (struct.isSetMaxVersions()) {
806 optionals.set(3);
807 }
808 oprot.writeBitSet(optionals, 4);
809 if (struct.isSetColumns()) {
810 {
811 oprot.writeI32(struct.columns.size());
812 for (TColumn _iter12 : struct.columns)
813 {
814 _iter12.write(oprot);
815 }
816 }
817 }
818 if (struct.isSetTimestamp()) {
819 oprot.writeI64(struct.timestamp);
820 }
821 if (struct.isSetTimeRange()) {
822 struct.timeRange.write(oprot);
823 }
824 if (struct.isSetMaxVersions()) {
825 oprot.writeI32(struct.maxVersions);
826 }
827 }
828
829 @Override
830 public void read(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException {
831 TTupleProtocol iprot = (TTupleProtocol) prot;
832 struct.row = iprot.readBinary();
833 struct.setRowIsSet(true);
834 BitSet incoming = iprot.readBitSet(4);
835 if (incoming.get(0)) {
836 {
837 org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
838 struct.columns = new ArrayList<TColumn>(_list13.size);
839 for (int _i14 = 0; _i14 < _list13.size; ++_i14)
840 {
841 TColumn _elem15;
842 _elem15 = new TColumn();
843 _elem15.read(iprot);
844 struct.columns.add(_elem15);
845 }
846 }
847 struct.setColumnsIsSet(true);
848 }
849 if (incoming.get(1)) {
850 struct.timestamp = iprot.readI64();
851 struct.setTimestampIsSet(true);
852 }
853 if (incoming.get(2)) {
854 struct.timeRange = new TTimeRange();
855 struct.timeRange.read(iprot);
856 struct.setTimeRangeIsSet(true);
857 }
858 if (incoming.get(3)) {
859 struct.maxVersions = iprot.readI32();
860 struct.setMaxVersionsIsSet(true);
861 }
862 }
863 }
864
865 }
866