1
2
3
4
5
6
7 package org.apache.hadoop.hbase.thrift2.generated;
8
9 import org.apache.commons.lang.builder.HashCodeBuilder;
10 import org.apache.thrift.scheme.IScheme;
11 import org.apache.thrift.scheme.SchemeFactory;
12 import org.apache.thrift.scheme.StandardScheme;
13
14 import org.apache.thrift.scheme.TupleScheme;
15 import org.apache.thrift.protocol.TTupleProtocol;
16 import java.util.List;
17 import java.util.ArrayList;
18 import java.util.Map;
19 import java.util.HashMap;
20 import java.util.EnumMap;
21 import java.util.Set;
22 import java.util.HashSet;
23 import java.util.EnumSet;
24 import java.util.Collections;
25 import java.util.BitSet;
26 import java.nio.ByteBuffer;
27 import java.util.Arrays;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public class TGet implements org.apache.thrift.TBase<TGet, TGet._Fields>, java.io.Serializable, Cloneable {
45 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet");
46
47 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);
48 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);
49 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);
50 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);
51 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);
52 private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6);
53 private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)7);
54
55 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
56 static {
57 schemes.put(StandardScheme.class, new TGetStandardSchemeFactory());
58 schemes.put(TupleScheme.class, new TGetTupleSchemeFactory());
59 }
60
61 public ByteBuffer row;
62 public List<TColumn> columns;
63 public long timestamp;
64 public TTimeRange timeRange;
65 public int maxVersions;
66 public ByteBuffer filterString;
67 public Map<ByteBuffer,ByteBuffer> attributes;
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 FILTER_STRING((short)6, "filterString"),
77 ATTRIBUTES((short)7, "attributes");
78
79 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
81 static {
82 for (_Fields field : EnumSet.allOf(_Fields.class)) {
83 byName.put(field.getFieldName(), field);
84 }
85 }
86
87
88
89
90 public static _Fields findByThriftId(int fieldId) {
91 switch(fieldId) {
92 case 1:
93 return ROW;
94 case 2:
95 return COLUMNS;
96 case 3:
97 return TIMESTAMP;
98 case 4:
99 return TIME_RANGE;
100 case 5:
101 return MAX_VERSIONS;
102 case 6:
103 return FILTER_STRING;
104 case 7:
105 return ATTRIBUTES;
106 default:
107 return null;
108 }
109 }
110
111
112
113
114
115 public static _Fields findByThriftIdOrThrow(int fieldId) {
116 _Fields fields = findByThriftId(fieldId);
117 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
118 return fields;
119 }
120
121
122
123
124 public static _Fields findByName(String name) {
125 return byName.get(name);
126 }
127
128 private final short _thriftId;
129 private final String _fieldName;
130
131 _Fields(short thriftId, String fieldName) {
132 _thriftId = thriftId;
133 _fieldName = fieldName;
134 }
135
136 public short getThriftFieldId() {
137 return _thriftId;
138 }
139
140 public String getFieldName() {
141 return _fieldName;
142 }
143 }
144
145
146 private static final int __TIMESTAMP_ISSET_ID = 0;
147 private static final int __MAXVERSIONS_ISSET_ID = 1;
148 private BitSet __isset_bit_vector = new BitSet(2);
149 private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.TIME_RANGE,_Fields.MAX_VERSIONS,_Fields.FILTER_STRING,_Fields.ATTRIBUTES};
150 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
151 static {
152 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
153 tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
154 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
155 tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
156 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
157 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class))));
158 tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
159 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
160 tmpMap.put(_Fields.TIME_RANGE, new org.apache.thrift.meta_data.FieldMetaData("timeRange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
161 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTimeRange.class)));
162 tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
163 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
164 tmpMap.put(_Fields.FILTER_STRING, new org.apache.thrift.meta_data.FieldMetaData("filterString", org.apache.thrift.TFieldRequirementType.OPTIONAL,
165 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
166 tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
167 new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
168 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
169 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
170 metaDataMap = Collections.unmodifiableMap(tmpMap);
171 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGet.class, metaDataMap);
172 }
173
174 public TGet() {
175 }
176
177 public TGet(
178 ByteBuffer row)
179 {
180 this();
181 this.row = row;
182 }
183
184
185
186
187 public TGet(TGet other) {
188 __isset_bit_vector.clear();
189 __isset_bit_vector.or(other.__isset_bit_vector);
190 if (other.isSetRow()) {
191 this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
192 ;
193 }
194 if (other.isSetColumns()) {
195 List<TColumn> __this__columns = new ArrayList<TColumn>();
196 for (TColumn other_element : other.columns) {
197 __this__columns.add(new TColumn(other_element));
198 }
199 this.columns = __this__columns;
200 }
201 this.timestamp = other.timestamp;
202 if (other.isSetTimeRange()) {
203 this.timeRange = new TTimeRange(other.timeRange);
204 }
205 this.maxVersions = other.maxVersions;
206 if (other.isSetFilterString()) {
207 this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
208 ;
209 }
210 if (other.isSetAttributes()) {
211 Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
212 for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
213
214 ByteBuffer other_element_key = other_element.getKey();
215 ByteBuffer other_element_value = other_element.getValue();
216
217 ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
218 ;
219
220 ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
221 ;
222
223 __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
224 }
225 this.attributes = __this__attributes;
226 }
227 }
228
229 public TGet deepCopy() {
230 return new TGet(this);
231 }
232
233 @Override
234 public void clear() {
235 this.row = null;
236 this.columns = null;
237 setTimestampIsSet(false);
238 this.timestamp = 0;
239 this.timeRange = null;
240 setMaxVersionsIsSet(false);
241 this.maxVersions = 0;
242 this.filterString = null;
243 this.attributes = null;
244 }
245
246 public byte[] getRow() {
247 setRow(org.apache.thrift.TBaseHelper.rightSize(row));
248 return row == null ? null : row.array();
249 }
250
251 public ByteBuffer bufferForRow() {
252 return row;
253 }
254
255 public TGet setRow(byte[] row) {
256 setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
257 return this;
258 }
259
260 public TGet setRow(ByteBuffer row) {
261 this.row = row;
262 return this;
263 }
264
265 public void unsetRow() {
266 this.row = null;
267 }
268
269
270 public boolean isSetRow() {
271 return this.row != null;
272 }
273
274 public void setRowIsSet(boolean value) {
275 if (!value) {
276 this.row = null;
277 }
278 }
279
280 public int getColumnsSize() {
281 return (this.columns == null) ? 0 : this.columns.size();
282 }
283
284 public java.util.Iterator<TColumn> getColumnsIterator() {
285 return (this.columns == null) ? null : this.columns.iterator();
286 }
287
288 public void addToColumns(TColumn elem) {
289 if (this.columns == null) {
290 this.columns = new ArrayList<TColumn>();
291 }
292 this.columns.add(elem);
293 }
294
295 public List<TColumn> getColumns() {
296 return this.columns;
297 }
298
299 public TGet setColumns(List<TColumn> columns) {
300 this.columns = columns;
301 return this;
302 }
303
304 public void unsetColumns() {
305 this.columns = null;
306 }
307
308
309 public boolean isSetColumns() {
310 return this.columns != null;
311 }
312
313 public void setColumnsIsSet(boolean value) {
314 if (!value) {
315 this.columns = null;
316 }
317 }
318
319 public long getTimestamp() {
320 return this.timestamp;
321 }
322
323 public TGet setTimestamp(long timestamp) {
324 this.timestamp = timestamp;
325 setTimestampIsSet(true);
326 return this;
327 }
328
329 public void unsetTimestamp() {
330 __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
331 }
332
333
334 public boolean isSetTimestamp() {
335 return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
336 }
337
338 public void setTimestampIsSet(boolean value) {
339 __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
340 }
341
342 public TTimeRange getTimeRange() {
343 return this.timeRange;
344 }
345
346 public TGet setTimeRange(TTimeRange timeRange) {
347 this.timeRange = timeRange;
348 return this;
349 }
350
351 public void unsetTimeRange() {
352 this.timeRange = null;
353 }
354
355
356 public boolean isSetTimeRange() {
357 return this.timeRange != null;
358 }
359
360 public void setTimeRangeIsSet(boolean value) {
361 if (!value) {
362 this.timeRange = null;
363 }
364 }
365
366 public int getMaxVersions() {
367 return this.maxVersions;
368 }
369
370 public TGet setMaxVersions(int maxVersions) {
371 this.maxVersions = maxVersions;
372 setMaxVersionsIsSet(true);
373 return this;
374 }
375
376 public void unsetMaxVersions() {
377 __isset_bit_vector.clear(__MAXVERSIONS_ISSET_ID);
378 }
379
380
381 public boolean isSetMaxVersions() {
382 return __isset_bit_vector.get(__MAXVERSIONS_ISSET_ID);
383 }
384
385 public void setMaxVersionsIsSet(boolean value) {
386 __isset_bit_vector.set(__MAXVERSIONS_ISSET_ID, value);
387 }
388
389 public byte[] getFilterString() {
390 setFilterString(org.apache.thrift.TBaseHelper.rightSize(filterString));
391 return filterString == null ? null : filterString.array();
392 }
393
394 public ByteBuffer bufferForFilterString() {
395 return filterString;
396 }
397
398 public TGet setFilterString(byte[] filterString) {
399 setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString));
400 return this;
401 }
402
403 public TGet setFilterString(ByteBuffer filterString) {
404 this.filterString = filterString;
405 return this;
406 }
407
408 public void unsetFilterString() {
409 this.filterString = null;
410 }
411
412
413 public boolean isSetFilterString() {
414 return this.filterString != null;
415 }
416
417 public void setFilterStringIsSet(boolean value) {
418 if (!value) {
419 this.filterString = null;
420 }
421 }
422
423 public int getAttributesSize() {
424 return (this.attributes == null) ? 0 : this.attributes.size();
425 }
426
427 public void putToAttributes(ByteBuffer key, ByteBuffer val) {
428 if (this.attributes == null) {
429 this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
430 }
431 this.attributes.put(key, val);
432 }
433
434 public Map<ByteBuffer,ByteBuffer> getAttributes() {
435 return this.attributes;
436 }
437
438 public TGet setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
439 this.attributes = attributes;
440 return this;
441 }
442
443 public void unsetAttributes() {
444 this.attributes = null;
445 }
446
447
448 public boolean isSetAttributes() {
449 return this.attributes != null;
450 }
451
452 public void setAttributesIsSet(boolean value) {
453 if (!value) {
454 this.attributes = null;
455 }
456 }
457
458 public void setFieldValue(_Fields field, Object value) {
459 switch (field) {
460 case ROW:
461 if (value == null) {
462 unsetRow();
463 } else {
464 setRow((ByteBuffer)value);
465 }
466 break;
467
468 case COLUMNS:
469 if (value == null) {
470 unsetColumns();
471 } else {
472 setColumns((List<TColumn>)value);
473 }
474 break;
475
476 case TIMESTAMP:
477 if (value == null) {
478 unsetTimestamp();
479 } else {
480 setTimestamp((Long)value);
481 }
482 break;
483
484 case TIME_RANGE:
485 if (value == null) {
486 unsetTimeRange();
487 } else {
488 setTimeRange((TTimeRange)value);
489 }
490 break;
491
492 case MAX_VERSIONS:
493 if (value == null) {
494 unsetMaxVersions();
495 } else {
496 setMaxVersions((Integer)value);
497 }
498 break;
499
500 case FILTER_STRING:
501 if (value == null) {
502 unsetFilterString();
503 } else {
504 setFilterString((ByteBuffer)value);
505 }
506 break;
507
508 case ATTRIBUTES:
509 if (value == null) {
510 unsetAttributes();
511 } else {
512 setAttributes((Map<ByteBuffer,ByteBuffer>)value);
513 }
514 break;
515
516 }
517 }
518
519 public Object getFieldValue(_Fields field) {
520 switch (field) {
521 case ROW:
522 return getRow();
523
524 case COLUMNS:
525 return getColumns();
526
527 case TIMESTAMP:
528 return Long.valueOf(getTimestamp());
529
530 case TIME_RANGE:
531 return getTimeRange();
532
533 case MAX_VERSIONS:
534 return Integer.valueOf(getMaxVersions());
535
536 case FILTER_STRING:
537 return getFilterString();
538
539 case ATTRIBUTES:
540 return getAttributes();
541
542 }
543 throw new IllegalStateException();
544 }
545
546
547 public boolean isSet(_Fields field) {
548 if (field == null) {
549 throw new IllegalArgumentException();
550 }
551
552 switch (field) {
553 case ROW:
554 return isSetRow();
555 case COLUMNS:
556 return isSetColumns();
557 case TIMESTAMP:
558 return isSetTimestamp();
559 case TIME_RANGE:
560 return isSetTimeRange();
561 case MAX_VERSIONS:
562 return isSetMaxVersions();
563 case FILTER_STRING:
564 return isSetFilterString();
565 case ATTRIBUTES:
566 return isSetAttributes();
567 }
568 throw new IllegalStateException();
569 }
570
571 @Override
572 public boolean equals(Object that) {
573 if (that == null)
574 return false;
575 if (that instanceof TGet)
576 return this.equals((TGet)that);
577 return false;
578 }
579
580 public boolean equals(TGet that) {
581 if (that == null)
582 return false;
583
584 boolean this_present_row = true && this.isSetRow();
585 boolean that_present_row = true && that.isSetRow();
586 if (this_present_row || that_present_row) {
587 if (!(this_present_row && that_present_row))
588 return false;
589 if (!this.row.equals(that.row))
590 return false;
591 }
592
593 boolean this_present_columns = true && this.isSetColumns();
594 boolean that_present_columns = true && that.isSetColumns();
595 if (this_present_columns || that_present_columns) {
596 if (!(this_present_columns && that_present_columns))
597 return false;
598 if (!this.columns.equals(that.columns))
599 return false;
600 }
601
602 boolean this_present_timestamp = true && this.isSetTimestamp();
603 boolean that_present_timestamp = true && that.isSetTimestamp();
604 if (this_present_timestamp || that_present_timestamp) {
605 if (!(this_present_timestamp && that_present_timestamp))
606 return false;
607 if (this.timestamp != that.timestamp)
608 return false;
609 }
610
611 boolean this_present_timeRange = true && this.isSetTimeRange();
612 boolean that_present_timeRange = true && that.isSetTimeRange();
613 if (this_present_timeRange || that_present_timeRange) {
614 if (!(this_present_timeRange && that_present_timeRange))
615 return false;
616 if (!this.timeRange.equals(that.timeRange))
617 return false;
618 }
619
620 boolean this_present_maxVersions = true && this.isSetMaxVersions();
621 boolean that_present_maxVersions = true && that.isSetMaxVersions();
622 if (this_present_maxVersions || that_present_maxVersions) {
623 if (!(this_present_maxVersions && that_present_maxVersions))
624 return false;
625 if (this.maxVersions != that.maxVersions)
626 return false;
627 }
628
629 boolean this_present_filterString = true && this.isSetFilterString();
630 boolean that_present_filterString = true && that.isSetFilterString();
631 if (this_present_filterString || that_present_filterString) {
632 if (!(this_present_filterString && that_present_filterString))
633 return false;
634 if (!this.filterString.equals(that.filterString))
635 return false;
636 }
637
638 boolean this_present_attributes = true && this.isSetAttributes();
639 boolean that_present_attributes = true && that.isSetAttributes();
640 if (this_present_attributes || that_present_attributes) {
641 if (!(this_present_attributes && that_present_attributes))
642 return false;
643 if (!this.attributes.equals(that.attributes))
644 return false;
645 }
646
647 return true;
648 }
649
650 @Override
651 public int hashCode() {
652 HashCodeBuilder builder = new HashCodeBuilder();
653
654 boolean present_row = true && (isSetRow());
655 builder.append(present_row);
656 if (present_row)
657 builder.append(row);
658
659 boolean present_columns = true && (isSetColumns());
660 builder.append(present_columns);
661 if (present_columns)
662 builder.append(columns);
663
664 boolean present_timestamp = true && (isSetTimestamp());
665 builder.append(present_timestamp);
666 if (present_timestamp)
667 builder.append(timestamp);
668
669 boolean present_timeRange = true && (isSetTimeRange());
670 builder.append(present_timeRange);
671 if (present_timeRange)
672 builder.append(timeRange);
673
674 boolean present_maxVersions = true && (isSetMaxVersions());
675 builder.append(present_maxVersions);
676 if (present_maxVersions)
677 builder.append(maxVersions);
678
679 boolean present_filterString = true && (isSetFilterString());
680 builder.append(present_filterString);
681 if (present_filterString)
682 builder.append(filterString);
683
684 boolean present_attributes = true && (isSetAttributes());
685 builder.append(present_attributes);
686 if (present_attributes)
687 builder.append(attributes);
688
689 return builder.toHashCode();
690 }
691
692 public int compareTo(TGet other) {
693 if (!getClass().equals(other.getClass())) {
694 return getClass().getName().compareTo(other.getClass().getName());
695 }
696
697 int lastComparison = 0;
698 TGet typedOther = (TGet)other;
699
700 lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
701 if (lastComparison != 0) {
702 return lastComparison;
703 }
704 if (isSetRow()) {
705 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
706 if (lastComparison != 0) {
707 return lastComparison;
708 }
709 }
710 lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
711 if (lastComparison != 0) {
712 return lastComparison;
713 }
714 if (isSetColumns()) {
715 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
716 if (lastComparison != 0) {
717 return lastComparison;
718 }
719 }
720 lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
721 if (lastComparison != 0) {
722 return lastComparison;
723 }
724 if (isSetTimestamp()) {
725 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
726 if (lastComparison != 0) {
727 return lastComparison;
728 }
729 }
730 lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
731 if (lastComparison != 0) {
732 return lastComparison;
733 }
734 if (isSetTimeRange()) {
735 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
736 if (lastComparison != 0) {
737 return lastComparison;
738 }
739 }
740 lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
741 if (lastComparison != 0) {
742 return lastComparison;
743 }
744 if (isSetMaxVersions()) {
745 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
746 if (lastComparison != 0) {
747 return lastComparison;
748 }
749 }
750 lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString());
751 if (lastComparison != 0) {
752 return lastComparison;
753 }
754 if (isSetFilterString()) {
755 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString);
756 if (lastComparison != 0) {
757 return lastComparison;
758 }
759 }
760 lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
761 if (lastComparison != 0) {
762 return lastComparison;
763 }
764 if (isSetAttributes()) {
765 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
766 if (lastComparison != 0) {
767 return lastComparison;
768 }
769 }
770 return 0;
771 }
772
773 public _Fields fieldForId(int fieldId) {
774 return _Fields.findByThriftId(fieldId);
775 }
776
777 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
778 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
779 }
780
781 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
782 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
783 }
784
785 @Override
786 public String toString() {
787 StringBuilder sb = new StringBuilder("TGet(");
788 boolean first = true;
789
790 sb.append("row:");
791 if (this.row == null) {
792 sb.append("null");
793 } else {
794 org.apache.thrift.TBaseHelper.toString(this.row, sb);
795 }
796 first = false;
797 if (isSetColumns()) {
798 if (!first) sb.append(", ");
799 sb.append("columns:");
800 if (this.columns == null) {
801 sb.append("null");
802 } else {
803 sb.append(this.columns);
804 }
805 first = false;
806 }
807 if (isSetTimestamp()) {
808 if (!first) sb.append(", ");
809 sb.append("timestamp:");
810 sb.append(this.timestamp);
811 first = false;
812 }
813 if (isSetTimeRange()) {
814 if (!first) sb.append(", ");
815 sb.append("timeRange:");
816 if (this.timeRange == null) {
817 sb.append("null");
818 } else {
819 sb.append(this.timeRange);
820 }
821 first = false;
822 }
823 if (isSetMaxVersions()) {
824 if (!first) sb.append(", ");
825 sb.append("maxVersions:");
826 sb.append(this.maxVersions);
827 first = false;
828 }
829 if (isSetFilterString()) {
830 if (!first) sb.append(", ");
831 sb.append("filterString:");
832 if (this.filterString == null) {
833 sb.append("null");
834 } else {
835 org.apache.thrift.TBaseHelper.toString(this.filterString, sb);
836 }
837 first = false;
838 }
839 if (isSetAttributes()) {
840 if (!first) sb.append(", ");
841 sb.append("attributes:");
842 if (this.attributes == null) {
843 sb.append("null");
844 } else {
845 sb.append(this.attributes);
846 }
847 first = false;
848 }
849 sb.append(")");
850 return sb.toString();
851 }
852
853 public void validate() throws org.apache.thrift.TException {
854
855 if (row == null) {
856 throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
857 }
858 }
859
860 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
861 try {
862 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
863 } catch (org.apache.thrift.TException te) {
864 throw new java.io.IOException(te);
865 }
866 }
867
868 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
869 try {
870
871 __isset_bit_vector = new BitSet(1);
872 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
873 } catch (org.apache.thrift.TException te) {
874 throw new java.io.IOException(te);
875 }
876 }
877
878 private static class TGetStandardSchemeFactory implements SchemeFactory {
879 public TGetStandardScheme getScheme() {
880 return new TGetStandardScheme();
881 }
882 }
883
884 private static class TGetStandardScheme extends StandardScheme<TGet> {
885
886 public void read(org.apache.thrift.protocol.TProtocol iprot, TGet struct) throws org.apache.thrift.TException {
887 org.apache.thrift.protocol.TField schemeField;
888 iprot.readStructBegin();
889 while (true)
890 {
891 schemeField = iprot.readFieldBegin();
892 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
893 break;
894 }
895 switch (schemeField.id) {
896 case 1:
897 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
898 struct.row = iprot.readBinary();
899 struct.setRowIsSet(true);
900 } else {
901 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
902 }
903 break;
904 case 2:
905 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
906 {
907 org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
908 struct.columns = new ArrayList<TColumn>(_list8.size);
909 for (int _i9 = 0; _i9 < _list8.size; ++_i9)
910 {
911 TColumn _elem10;
912 _elem10 = new TColumn();
913 _elem10.read(iprot);
914 struct.columns.add(_elem10);
915 }
916 iprot.readListEnd();
917 }
918 struct.setColumnsIsSet(true);
919 } else {
920 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
921 }
922 break;
923 case 3:
924 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
925 struct.timestamp = iprot.readI64();
926 struct.setTimestampIsSet(true);
927 } else {
928 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
929 }
930 break;
931 case 4:
932 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
933 struct.timeRange = new TTimeRange();
934 struct.timeRange.read(iprot);
935 struct.setTimeRangeIsSet(true);
936 } else {
937 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
938 }
939 break;
940 case 5:
941 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
942 struct.maxVersions = iprot.readI32();
943 struct.setMaxVersionsIsSet(true);
944 } else {
945 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
946 }
947 break;
948 case 6:
949 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
950 struct.filterString = iprot.readBinary();
951 struct.setFilterStringIsSet(true);
952 } else {
953 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
954 }
955 break;
956 case 7:
957 if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
958 {
959 org.apache.thrift.protocol.TMap _map11 = iprot.readMapBegin();
960 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map11.size);
961 for (int _i12 = 0; _i12 < _map11.size; ++_i12)
962 {
963 ByteBuffer _key13;
964 ByteBuffer _val14;
965 _key13 = iprot.readBinary();
966 _val14 = iprot.readBinary();
967 struct.attributes.put(_key13, _val14);
968 }
969 iprot.readMapEnd();
970 }
971 struct.setAttributesIsSet(true);
972 } else {
973 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
974 }
975 break;
976 default:
977 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
978 }
979 iprot.readFieldEnd();
980 }
981 iprot.readStructEnd();
982
983
984 struct.validate();
985 }
986
987 public void write(org.apache.thrift.protocol.TProtocol oprot, TGet struct) throws org.apache.thrift.TException {
988 struct.validate();
989
990 oprot.writeStructBegin(STRUCT_DESC);
991 if (struct.row != null) {
992 oprot.writeFieldBegin(ROW_FIELD_DESC);
993 oprot.writeBinary(struct.row);
994 oprot.writeFieldEnd();
995 }
996 if (struct.columns != null) {
997 if (struct.isSetColumns()) {
998 oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
999 {
1000 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
1001 for (TColumn _iter15 : struct.columns)
1002 {
1003 _iter15.write(oprot);
1004 }
1005 oprot.writeListEnd();
1006 }
1007 oprot.writeFieldEnd();
1008 }
1009 }
1010 if (struct.isSetTimestamp()) {
1011 oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
1012 oprot.writeI64(struct.timestamp);
1013 oprot.writeFieldEnd();
1014 }
1015 if (struct.timeRange != null) {
1016 if (struct.isSetTimeRange()) {
1017 oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
1018 struct.timeRange.write(oprot);
1019 oprot.writeFieldEnd();
1020 }
1021 }
1022 if (struct.isSetMaxVersions()) {
1023 oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
1024 oprot.writeI32(struct.maxVersions);
1025 oprot.writeFieldEnd();
1026 }
1027 if (struct.filterString != null) {
1028 if (struct.isSetFilterString()) {
1029 oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC);
1030 oprot.writeBinary(struct.filterString);
1031 oprot.writeFieldEnd();
1032 }
1033 }
1034 if (struct.attributes != null) {
1035 if (struct.isSetAttributes()) {
1036 oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
1037 {
1038 oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
1039 for (Map.Entry<ByteBuffer, ByteBuffer> _iter16 : struct.attributes.entrySet())
1040 {
1041 oprot.writeBinary(_iter16.getKey());
1042 oprot.writeBinary(_iter16.getValue());
1043 }
1044 oprot.writeMapEnd();
1045 }
1046 oprot.writeFieldEnd();
1047 }
1048 }
1049 oprot.writeFieldStop();
1050 oprot.writeStructEnd();
1051 }
1052
1053 }
1054
1055 private static class TGetTupleSchemeFactory implements SchemeFactory {
1056 public TGetTupleScheme getScheme() {
1057 return new TGetTupleScheme();
1058 }
1059 }
1060
1061 private static class TGetTupleScheme extends TupleScheme<TGet> {
1062
1063 @Override
1064 public void write(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException {
1065 TTupleProtocol oprot = (TTupleProtocol) prot;
1066 oprot.writeBinary(struct.row);
1067 BitSet optionals = new BitSet();
1068 if (struct.isSetColumns()) {
1069 optionals.set(0);
1070 }
1071 if (struct.isSetTimestamp()) {
1072 optionals.set(1);
1073 }
1074 if (struct.isSetTimeRange()) {
1075 optionals.set(2);
1076 }
1077 if (struct.isSetMaxVersions()) {
1078 optionals.set(3);
1079 }
1080 if (struct.isSetFilterString()) {
1081 optionals.set(4);
1082 }
1083 if (struct.isSetAttributes()) {
1084 optionals.set(5);
1085 }
1086 oprot.writeBitSet(optionals, 6);
1087 if (struct.isSetColumns()) {
1088 {
1089 oprot.writeI32(struct.columns.size());
1090 for (TColumn _iter17 : struct.columns)
1091 {
1092 _iter17.write(oprot);
1093 }
1094 }
1095 }
1096 if (struct.isSetTimestamp()) {
1097 oprot.writeI64(struct.timestamp);
1098 }
1099 if (struct.isSetTimeRange()) {
1100 struct.timeRange.write(oprot);
1101 }
1102 if (struct.isSetMaxVersions()) {
1103 oprot.writeI32(struct.maxVersions);
1104 }
1105 if (struct.isSetFilterString()) {
1106 oprot.writeBinary(struct.filterString);
1107 }
1108 if (struct.isSetAttributes()) {
1109 {
1110 oprot.writeI32(struct.attributes.size());
1111 for (Map.Entry<ByteBuffer, ByteBuffer> _iter18 : struct.attributes.entrySet())
1112 {
1113 oprot.writeBinary(_iter18.getKey());
1114 oprot.writeBinary(_iter18.getValue());
1115 }
1116 }
1117 }
1118 }
1119
1120 @Override
1121 public void read(org.apache.thrift.protocol.TProtocol prot, TGet struct) throws org.apache.thrift.TException {
1122 TTupleProtocol iprot = (TTupleProtocol) prot;
1123 struct.row = iprot.readBinary();
1124 struct.setRowIsSet(true);
1125 BitSet incoming = iprot.readBitSet(6);
1126 if (incoming.get(0)) {
1127 {
1128 org.apache.thrift.protocol.TList _list19 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
1129 struct.columns = new ArrayList<TColumn>(_list19.size);
1130 for (int _i20 = 0; _i20 < _list19.size; ++_i20)
1131 {
1132 TColumn _elem21;
1133 _elem21 = new TColumn();
1134 _elem21.read(iprot);
1135 struct.columns.add(_elem21);
1136 }
1137 }
1138 struct.setColumnsIsSet(true);
1139 }
1140 if (incoming.get(1)) {
1141 struct.timestamp = iprot.readI64();
1142 struct.setTimestampIsSet(true);
1143 }
1144 if (incoming.get(2)) {
1145 struct.timeRange = new TTimeRange();
1146 struct.timeRange.read(iprot);
1147 struct.setTimeRangeIsSet(true);
1148 }
1149 if (incoming.get(3)) {
1150 struct.maxVersions = iprot.readI32();
1151 struct.setMaxVersionsIsSet(true);
1152 }
1153 if (incoming.get(4)) {
1154 struct.filterString = iprot.readBinary();
1155 struct.setFilterStringIsSet(true);
1156 }
1157 if (incoming.get(5)) {
1158 {
1159 org.apache.thrift.protocol.TMap _map22 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
1160 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map22.size);
1161 for (int _i23 = 0; _i23 < _map22.size; ++_i23)
1162 {
1163 ByteBuffer _key24;
1164 ByteBuffer _val25;
1165 _key24 = iprot.readBinary();
1166 _val25 = iprot.readBinary();
1167 struct.attributes.put(_key24, _val25);
1168 }
1169 }
1170 struct.setAttributesIsSet(true);
1171 }
1172 }
1173 }
1174
1175 }
1176