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 java.util.List;
16 import java.util.ArrayList;
17 import java.util.Map;
18 import java.util.HashMap;
19 import java.util.EnumMap;
20 import java.util.Set;
21 import java.util.HashSet;
22 import java.util.EnumSet;
23 import java.util.Collections;
24 import java.util.BitSet;
25 import java.nio.ByteBuffer;
26 import java.util.Arrays;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
29
30
31
32
33
34 public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable {
35 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan");
36
37 private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)1);
38 private static final org.apache.thrift.protocol.TField STOP_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("stopRow", org.apache.thrift.protocol.TType.STRING, (short)2);
39 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)3);
40 private static final org.apache.thrift.protocol.TField CACHING_FIELD_DESC = new org.apache.thrift.protocol.TField("caching", org.apache.thrift.protocol.TType.I32, (short)4);
41 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);
42 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)6);
43 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)7);
44 private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batchSize", org.apache.thrift.protocol.TType.I32, (short)8);
45 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)9);
46
47 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
48 static {
49 schemes.put(StandardScheme.class, new TScanStandardSchemeFactory());
50 schemes.put(TupleScheme.class, new TScanTupleSchemeFactory());
51 }
52
53 public ByteBuffer startRow;
54 public ByteBuffer stopRow;
55 public List<TColumn> columns;
56 public int caching;
57 public int maxVersions;
58 public TTimeRange timeRange;
59 public ByteBuffer filterString;
60 public int batchSize;
61 public Map<ByteBuffer,ByteBuffer> attributes;
62
63
64 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
65 START_ROW((short)1, "startRow"),
66 STOP_ROW((short)2, "stopRow"),
67 COLUMNS((short)3, "columns"),
68 CACHING((short)4, "caching"),
69 MAX_VERSIONS((short)5, "maxVersions"),
70 TIME_RANGE((short)6, "timeRange"),
71 FILTER_STRING((short)7, "filterString"),
72 BATCH_SIZE((short)8, "batchSize"),
73 ATTRIBUTES((short)9, "attributes");
74
75 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
76
77 static {
78 for (_Fields field : EnumSet.allOf(_Fields.class)) {
79 byName.put(field.getFieldName(), field);
80 }
81 }
82
83
84
85
86 public static _Fields findByThriftId(int fieldId) {
87 switch(fieldId) {
88 case 1:
89 return START_ROW;
90 case 2:
91 return STOP_ROW;
92 case 3:
93 return COLUMNS;
94 case 4:
95 return CACHING;
96 case 5:
97 return MAX_VERSIONS;
98 case 6:
99 return TIME_RANGE;
100 case 7:
101 return FILTER_STRING;
102 case 8:
103 return BATCH_SIZE;
104 case 9:
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 __CACHING_ISSET_ID = 0;
147 private static final int __MAXVERSIONS_ISSET_ID = 1;
148 private static final int __BATCHSIZE_ISSET_ID = 2;
149 private BitSet __isset_bit_vector = new BitSet(3);
150 private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.COLUMNS,_Fields.CACHING,_Fields.MAX_VERSIONS,_Fields.TIME_RANGE,_Fields.FILTER_STRING,_Fields.BATCH_SIZE,_Fields.ATTRIBUTES};
151 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
152 static {
153 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
154 tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.OPTIONAL,
155 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
156 tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.OPTIONAL,
157 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
158 tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
159 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
160 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class))));
161 tmpMap.put(_Fields.CACHING, new org.apache.thrift.meta_data.FieldMetaData("caching", org.apache.thrift.TFieldRequirementType.OPTIONAL,
162 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
163 tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
164 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
165 tmpMap.put(_Fields.TIME_RANGE, new org.apache.thrift.meta_data.FieldMetaData("timeRange", org.apache.thrift.TFieldRequirementType.OPTIONAL,
166 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTimeRange.class)));
167 tmpMap.put(_Fields.FILTER_STRING, new org.apache.thrift.meta_data.FieldMetaData("filterString", org.apache.thrift.TFieldRequirementType.OPTIONAL,
168 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
169 tmpMap.put(_Fields.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batchSize", org.apache.thrift.TFieldRequirementType.OPTIONAL,
170 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
171 tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
172 new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
173 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
174 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
175 metaDataMap = Collections.unmodifiableMap(tmpMap);
176 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap);
177 }
178
179 public TScan() {
180 this.maxVersions = 1;
181
182 }
183
184
185
186
187 public TScan(TScan other) {
188 __isset_bit_vector.clear();
189 __isset_bit_vector.or(other.__isset_bit_vector);
190 if (other.isSetStartRow()) {
191 this.startRow = org.apache.thrift.TBaseHelper.copyBinary(other.startRow);
192 ;
193 }
194 if (other.isSetStopRow()) {
195 this.stopRow = org.apache.thrift.TBaseHelper.copyBinary(other.stopRow);
196 ;
197 }
198 if (other.isSetColumns()) {
199 List<TColumn> __this__columns = new ArrayList<TColumn>();
200 for (TColumn other_element : other.columns) {
201 __this__columns.add(new TColumn(other_element));
202 }
203 this.columns = __this__columns;
204 }
205 this.caching = other.caching;
206 this.maxVersions = other.maxVersions;
207 if (other.isSetTimeRange()) {
208 this.timeRange = new TTimeRange(other.timeRange);
209 }
210 if (other.isSetFilterString()) {
211 this.filterString = org.apache.thrift.TBaseHelper.copyBinary(other.filterString);
212 ;
213 }
214 this.batchSize = other.batchSize;
215 if (other.isSetAttributes()) {
216 Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
217 for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
218
219 ByteBuffer other_element_key = other_element.getKey();
220 ByteBuffer other_element_value = other_element.getValue();
221
222 ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
223 ;
224
225 ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
226 ;
227
228 __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
229 }
230 this.attributes = __this__attributes;
231 }
232 }
233
234 public TScan deepCopy() {
235 return new TScan(this);
236 }
237
238 @Override
239 public void clear() {
240 this.startRow = null;
241 this.stopRow = null;
242 this.columns = null;
243 setCachingIsSet(false);
244 this.caching = 0;
245 this.maxVersions = 1;
246
247 this.timeRange = null;
248 this.filterString = null;
249 setBatchSizeIsSet(false);
250 this.batchSize = 0;
251 this.attributes = null;
252 }
253
254 public byte[] getStartRow() {
255 setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow));
256 return startRow == null ? null : startRow.array();
257 }
258
259 public ByteBuffer bufferForStartRow() {
260 return startRow;
261 }
262
263 public TScan setStartRow(byte[] startRow) {
264 setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow));
265 return this;
266 }
267
268 public TScan setStartRow(ByteBuffer startRow) {
269 this.startRow = startRow;
270 return this;
271 }
272
273 public void unsetStartRow() {
274 this.startRow = null;
275 }
276
277
278 public boolean isSetStartRow() {
279 return this.startRow != null;
280 }
281
282 public void setStartRowIsSet(boolean value) {
283 if (!value) {
284 this.startRow = null;
285 }
286 }
287
288 public byte[] getStopRow() {
289 setStopRow(org.apache.thrift.TBaseHelper.rightSize(stopRow));
290 return stopRow == null ? null : stopRow.array();
291 }
292
293 public ByteBuffer bufferForStopRow() {
294 return stopRow;
295 }
296
297 public TScan setStopRow(byte[] stopRow) {
298 setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow));
299 return this;
300 }
301
302 public TScan setStopRow(ByteBuffer stopRow) {
303 this.stopRow = stopRow;
304 return this;
305 }
306
307 public void unsetStopRow() {
308 this.stopRow = null;
309 }
310
311
312 public boolean isSetStopRow() {
313 return this.stopRow != null;
314 }
315
316 public void setStopRowIsSet(boolean value) {
317 if (!value) {
318 this.stopRow = null;
319 }
320 }
321
322 public int getColumnsSize() {
323 return (this.columns == null) ? 0 : this.columns.size();
324 }
325
326 public java.util.Iterator<TColumn> getColumnsIterator() {
327 return (this.columns == null) ? null : this.columns.iterator();
328 }
329
330 public void addToColumns(TColumn elem) {
331 if (this.columns == null) {
332 this.columns = new ArrayList<TColumn>();
333 }
334 this.columns.add(elem);
335 }
336
337 public List<TColumn> getColumns() {
338 return this.columns;
339 }
340
341 public TScan setColumns(List<TColumn> columns) {
342 this.columns = columns;
343 return this;
344 }
345
346 public void unsetColumns() {
347 this.columns = null;
348 }
349
350
351 public boolean isSetColumns() {
352 return this.columns != null;
353 }
354
355 public void setColumnsIsSet(boolean value) {
356 if (!value) {
357 this.columns = null;
358 }
359 }
360
361 public int getCaching() {
362 return this.caching;
363 }
364
365 public TScan setCaching(int caching) {
366 this.caching = caching;
367 setCachingIsSet(true);
368 return this;
369 }
370
371 public void unsetCaching() {
372 __isset_bit_vector.clear(__CACHING_ISSET_ID);
373 }
374
375
376 public boolean isSetCaching() {
377 return __isset_bit_vector.get(__CACHING_ISSET_ID);
378 }
379
380 public void setCachingIsSet(boolean value) {
381 __isset_bit_vector.set(__CACHING_ISSET_ID, value);
382 }
383
384 public int getMaxVersions() {
385 return this.maxVersions;
386 }
387
388 public TScan setMaxVersions(int maxVersions) {
389 this.maxVersions = maxVersions;
390 setMaxVersionsIsSet(true);
391 return this;
392 }
393
394 public void unsetMaxVersions() {
395 __isset_bit_vector.clear(__MAXVERSIONS_ISSET_ID);
396 }
397
398
399 public boolean isSetMaxVersions() {
400 return __isset_bit_vector.get(__MAXVERSIONS_ISSET_ID);
401 }
402
403 public void setMaxVersionsIsSet(boolean value) {
404 __isset_bit_vector.set(__MAXVERSIONS_ISSET_ID, value);
405 }
406
407 public TTimeRange getTimeRange() {
408 return this.timeRange;
409 }
410
411 public TScan setTimeRange(TTimeRange timeRange) {
412 this.timeRange = timeRange;
413 return this;
414 }
415
416 public void unsetTimeRange() {
417 this.timeRange = null;
418 }
419
420
421 public boolean isSetTimeRange() {
422 return this.timeRange != null;
423 }
424
425 public void setTimeRangeIsSet(boolean value) {
426 if (!value) {
427 this.timeRange = null;
428 }
429 }
430
431 public byte[] getFilterString() {
432 setFilterString(org.apache.thrift.TBaseHelper.rightSize(filterString));
433 return filterString == null ? null : filterString.array();
434 }
435
436 public ByteBuffer bufferForFilterString() {
437 return filterString;
438 }
439
440 public TScan setFilterString(byte[] filterString) {
441 setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString));
442 return this;
443 }
444
445 public TScan setFilterString(ByteBuffer filterString) {
446 this.filterString = filterString;
447 return this;
448 }
449
450 public void unsetFilterString() {
451 this.filterString = null;
452 }
453
454
455 public boolean isSetFilterString() {
456 return this.filterString != null;
457 }
458
459 public void setFilterStringIsSet(boolean value) {
460 if (!value) {
461 this.filterString = null;
462 }
463 }
464
465 public int getBatchSize() {
466 return this.batchSize;
467 }
468
469 public TScan setBatchSize(int batchSize) {
470 this.batchSize = batchSize;
471 setBatchSizeIsSet(true);
472 return this;
473 }
474
475 public void unsetBatchSize() {
476 __isset_bit_vector.clear(__BATCHSIZE_ISSET_ID);
477 }
478
479
480 public boolean isSetBatchSize() {
481 return __isset_bit_vector.get(__BATCHSIZE_ISSET_ID);
482 }
483
484 public void setBatchSizeIsSet(boolean value) {
485 __isset_bit_vector.set(__BATCHSIZE_ISSET_ID, value);
486 }
487
488 public int getAttributesSize() {
489 return (this.attributes == null) ? 0 : this.attributes.size();
490 }
491
492 public void putToAttributes(ByteBuffer key, ByteBuffer val) {
493 if (this.attributes == null) {
494 this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
495 }
496 this.attributes.put(key, val);
497 }
498
499 public Map<ByteBuffer,ByteBuffer> getAttributes() {
500 return this.attributes;
501 }
502
503 public TScan setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
504 this.attributes = attributes;
505 return this;
506 }
507
508 public void unsetAttributes() {
509 this.attributes = null;
510 }
511
512
513 public boolean isSetAttributes() {
514 return this.attributes != null;
515 }
516
517 public void setAttributesIsSet(boolean value) {
518 if (!value) {
519 this.attributes = null;
520 }
521 }
522
523 public void setFieldValue(_Fields field, Object value) {
524 switch (field) {
525 case START_ROW:
526 if (value == null) {
527 unsetStartRow();
528 } else {
529 setStartRow((ByteBuffer)value);
530 }
531 break;
532
533 case STOP_ROW:
534 if (value == null) {
535 unsetStopRow();
536 } else {
537 setStopRow((ByteBuffer)value);
538 }
539 break;
540
541 case COLUMNS:
542 if (value == null) {
543 unsetColumns();
544 } else {
545 setColumns((List<TColumn>)value);
546 }
547 break;
548
549 case CACHING:
550 if (value == null) {
551 unsetCaching();
552 } else {
553 setCaching((Integer)value);
554 }
555 break;
556
557 case MAX_VERSIONS:
558 if (value == null) {
559 unsetMaxVersions();
560 } else {
561 setMaxVersions((Integer)value);
562 }
563 break;
564
565 case TIME_RANGE:
566 if (value == null) {
567 unsetTimeRange();
568 } else {
569 setTimeRange((TTimeRange)value);
570 }
571 break;
572
573 case FILTER_STRING:
574 if (value == null) {
575 unsetFilterString();
576 } else {
577 setFilterString((ByteBuffer)value);
578 }
579 break;
580
581 case BATCH_SIZE:
582 if (value == null) {
583 unsetBatchSize();
584 } else {
585 setBatchSize((Integer)value);
586 }
587 break;
588
589 case ATTRIBUTES:
590 if (value == null) {
591 unsetAttributes();
592 } else {
593 setAttributes((Map<ByteBuffer,ByteBuffer>)value);
594 }
595 break;
596
597 }
598 }
599
600 public Object getFieldValue(_Fields field) {
601 switch (field) {
602 case START_ROW:
603 return getStartRow();
604
605 case STOP_ROW:
606 return getStopRow();
607
608 case COLUMNS:
609 return getColumns();
610
611 case CACHING:
612 return Integer.valueOf(getCaching());
613
614 case MAX_VERSIONS:
615 return Integer.valueOf(getMaxVersions());
616
617 case TIME_RANGE:
618 return getTimeRange();
619
620 case FILTER_STRING:
621 return getFilterString();
622
623 case BATCH_SIZE:
624 return Integer.valueOf(getBatchSize());
625
626 case ATTRIBUTES:
627 return getAttributes();
628
629 }
630 throw new IllegalStateException();
631 }
632
633
634 public boolean isSet(_Fields field) {
635 if (field == null) {
636 throw new IllegalArgumentException();
637 }
638
639 switch (field) {
640 case START_ROW:
641 return isSetStartRow();
642 case STOP_ROW:
643 return isSetStopRow();
644 case COLUMNS:
645 return isSetColumns();
646 case CACHING:
647 return isSetCaching();
648 case MAX_VERSIONS:
649 return isSetMaxVersions();
650 case TIME_RANGE:
651 return isSetTimeRange();
652 case FILTER_STRING:
653 return isSetFilterString();
654 case BATCH_SIZE:
655 return isSetBatchSize();
656 case ATTRIBUTES:
657 return isSetAttributes();
658 }
659 throw new IllegalStateException();
660 }
661
662 @Override
663 public boolean equals(Object that) {
664 if (that == null)
665 return false;
666 if (that instanceof TScan)
667 return this.equals((TScan)that);
668 return false;
669 }
670
671 public boolean equals(TScan that) {
672 if (that == null)
673 return false;
674
675 boolean this_present_startRow = true && this.isSetStartRow();
676 boolean that_present_startRow = true && that.isSetStartRow();
677 if (this_present_startRow || that_present_startRow) {
678 if (!(this_present_startRow && that_present_startRow))
679 return false;
680 if (!this.startRow.equals(that.startRow))
681 return false;
682 }
683
684 boolean this_present_stopRow = true && this.isSetStopRow();
685 boolean that_present_stopRow = true && that.isSetStopRow();
686 if (this_present_stopRow || that_present_stopRow) {
687 if (!(this_present_stopRow && that_present_stopRow))
688 return false;
689 if (!this.stopRow.equals(that.stopRow))
690 return false;
691 }
692
693 boolean this_present_columns = true && this.isSetColumns();
694 boolean that_present_columns = true && that.isSetColumns();
695 if (this_present_columns || that_present_columns) {
696 if (!(this_present_columns && that_present_columns))
697 return false;
698 if (!this.columns.equals(that.columns))
699 return false;
700 }
701
702 boolean this_present_caching = true && this.isSetCaching();
703 boolean that_present_caching = true && that.isSetCaching();
704 if (this_present_caching || that_present_caching) {
705 if (!(this_present_caching && that_present_caching))
706 return false;
707 if (this.caching != that.caching)
708 return false;
709 }
710
711 boolean this_present_maxVersions = true && this.isSetMaxVersions();
712 boolean that_present_maxVersions = true && that.isSetMaxVersions();
713 if (this_present_maxVersions || that_present_maxVersions) {
714 if (!(this_present_maxVersions && that_present_maxVersions))
715 return false;
716 if (this.maxVersions != that.maxVersions)
717 return false;
718 }
719
720 boolean this_present_timeRange = true && this.isSetTimeRange();
721 boolean that_present_timeRange = true && that.isSetTimeRange();
722 if (this_present_timeRange || that_present_timeRange) {
723 if (!(this_present_timeRange && that_present_timeRange))
724 return false;
725 if (!this.timeRange.equals(that.timeRange))
726 return false;
727 }
728
729 boolean this_present_filterString = true && this.isSetFilterString();
730 boolean that_present_filterString = true && that.isSetFilterString();
731 if (this_present_filterString || that_present_filterString) {
732 if (!(this_present_filterString && that_present_filterString))
733 return false;
734 if (!this.filterString.equals(that.filterString))
735 return false;
736 }
737
738 boolean this_present_batchSize = true && this.isSetBatchSize();
739 boolean that_present_batchSize = true && that.isSetBatchSize();
740 if (this_present_batchSize || that_present_batchSize) {
741 if (!(this_present_batchSize && that_present_batchSize))
742 return false;
743 if (this.batchSize != that.batchSize)
744 return false;
745 }
746
747 boolean this_present_attributes = true && this.isSetAttributes();
748 boolean that_present_attributes = true && that.isSetAttributes();
749 if (this_present_attributes || that_present_attributes) {
750 if (!(this_present_attributes && that_present_attributes))
751 return false;
752 if (!this.attributes.equals(that.attributes))
753 return false;
754 }
755
756 return true;
757 }
758
759 @Override
760 public int hashCode() {
761 return 0;
762 }
763
764 public int compareTo(TScan other) {
765 if (!getClass().equals(other.getClass())) {
766 return getClass().getName().compareTo(other.getClass().getName());
767 }
768
769 int lastComparison = 0;
770 TScan typedOther = (TScan)other;
771
772 lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow());
773 if (lastComparison != 0) {
774 return lastComparison;
775 }
776 if (isSetStartRow()) {
777 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow);
778 if (lastComparison != 0) {
779 return lastComparison;
780 }
781 }
782 lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow());
783 if (lastComparison != 0) {
784 return lastComparison;
785 }
786 if (isSetStopRow()) {
787 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow);
788 if (lastComparison != 0) {
789 return lastComparison;
790 }
791 }
792 lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
793 if (lastComparison != 0) {
794 return lastComparison;
795 }
796 if (isSetColumns()) {
797 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
798 if (lastComparison != 0) {
799 return lastComparison;
800 }
801 }
802 lastComparison = Boolean.valueOf(isSetCaching()).compareTo(typedOther.isSetCaching());
803 if (lastComparison != 0) {
804 return lastComparison;
805 }
806 if (isSetCaching()) {
807 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, typedOther.caching);
808 if (lastComparison != 0) {
809 return lastComparison;
810 }
811 }
812 lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
813 if (lastComparison != 0) {
814 return lastComparison;
815 }
816 if (isSetMaxVersions()) {
817 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
818 if (lastComparison != 0) {
819 return lastComparison;
820 }
821 }
822 lastComparison = Boolean.valueOf(isSetTimeRange()).compareTo(typedOther.isSetTimeRange());
823 if (lastComparison != 0) {
824 return lastComparison;
825 }
826 if (isSetTimeRange()) {
827 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeRange, typedOther.timeRange);
828 if (lastComparison != 0) {
829 return lastComparison;
830 }
831 }
832 lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString());
833 if (lastComparison != 0) {
834 return lastComparison;
835 }
836 if (isSetFilterString()) {
837 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString);
838 if (lastComparison != 0) {
839 return lastComparison;
840 }
841 }
842 lastComparison = Boolean.valueOf(isSetBatchSize()).compareTo(typedOther.isSetBatchSize());
843 if (lastComparison != 0) {
844 return lastComparison;
845 }
846 if (isSetBatchSize()) {
847 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batchSize, typedOther.batchSize);
848 if (lastComparison != 0) {
849 return lastComparison;
850 }
851 }
852 lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
853 if (lastComparison != 0) {
854 return lastComparison;
855 }
856 if (isSetAttributes()) {
857 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
858 if (lastComparison != 0) {
859 return lastComparison;
860 }
861 }
862 return 0;
863 }
864
865 public _Fields fieldForId(int fieldId) {
866 return _Fields.findByThriftId(fieldId);
867 }
868
869 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
870 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
871 }
872
873 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
874 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
875 }
876
877 @Override
878 public String toString() {
879 StringBuilder sb = new StringBuilder("TScan(");
880 boolean first = true;
881
882 if (isSetStartRow()) {
883 sb.append("startRow:");
884 if (this.startRow == null) {
885 sb.append("null");
886 } else {
887 org.apache.thrift.TBaseHelper.toString(this.startRow, sb);
888 }
889 first = false;
890 }
891 if (isSetStopRow()) {
892 if (!first) sb.append(", ");
893 sb.append("stopRow:");
894 if (this.stopRow == null) {
895 sb.append("null");
896 } else {
897 org.apache.thrift.TBaseHelper.toString(this.stopRow, sb);
898 }
899 first = false;
900 }
901 if (isSetColumns()) {
902 if (!first) sb.append(", ");
903 sb.append("columns:");
904 if (this.columns == null) {
905 sb.append("null");
906 } else {
907 sb.append(this.columns);
908 }
909 first = false;
910 }
911 if (isSetCaching()) {
912 if (!first) sb.append(", ");
913 sb.append("caching:");
914 sb.append(this.caching);
915 first = false;
916 }
917 if (isSetMaxVersions()) {
918 if (!first) sb.append(", ");
919 sb.append("maxVersions:");
920 sb.append(this.maxVersions);
921 first = false;
922 }
923 if (isSetTimeRange()) {
924 if (!first) sb.append(", ");
925 sb.append("timeRange:");
926 if (this.timeRange == null) {
927 sb.append("null");
928 } else {
929 sb.append(this.timeRange);
930 }
931 first = false;
932 }
933 if (isSetFilterString()) {
934 if (!first) sb.append(", ");
935 sb.append("filterString:");
936 if (this.filterString == null) {
937 sb.append("null");
938 } else {
939 org.apache.thrift.TBaseHelper.toString(this.filterString, sb);
940 }
941 first = false;
942 }
943 if (isSetBatchSize()) {
944 if (!first) sb.append(", ");
945 sb.append("batchSize:");
946 sb.append(this.batchSize);
947 first = false;
948 }
949 if (isSetAttributes()) {
950 if (!first) sb.append(", ");
951 sb.append("attributes:");
952 if (this.attributes == null) {
953 sb.append("null");
954 } else {
955 sb.append(this.attributes);
956 }
957 first = false;
958 }
959 sb.append(")");
960 return sb.toString();
961 }
962
963 public void validate() throws org.apache.thrift.TException {
964
965 }
966
967 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
968 try {
969 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
970 } catch (org.apache.thrift.TException te) {
971 throw new java.io.IOException(te);
972 }
973 }
974
975 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
976 try {
977
978 __isset_bit_vector = new BitSet(1);
979 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
980 } catch (org.apache.thrift.TException te) {
981 throw new java.io.IOException(te);
982 }
983 }
984
985 private static class TScanStandardSchemeFactory implements SchemeFactory {
986 public TScanStandardScheme getScheme() {
987 return new TScanStandardScheme();
988 }
989 }
990
991 private static class TScanStandardScheme extends StandardScheme<TScan> {
992
993 public void read(org.apache.thrift.protocol.TProtocol iprot, TScan struct) throws org.apache.thrift.TException {
994 org.apache.thrift.protocol.TField schemeField;
995 iprot.readStructBegin();
996 while (true)
997 {
998 schemeField = iprot.readFieldBegin();
999 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
1000 break;
1001 }
1002 switch (schemeField.id) {
1003 case 1:
1004 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1005 struct.startRow = iprot.readBinary();
1006 struct.setStartRowIsSet(true);
1007 } else {
1008 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1009 }
1010 break;
1011 case 2:
1012 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1013 struct.stopRow = iprot.readBinary();
1014 struct.setStopRowIsSet(true);
1015 } else {
1016 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1017 }
1018 break;
1019 case 3:
1020 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
1021 {
1022 org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
1023 struct.columns = new ArrayList<TColumn>(_list70.size);
1024 for (int _i71 = 0; _i71 < _list70.size; ++_i71)
1025 {
1026 TColumn _elem72;
1027 _elem72 = new TColumn();
1028 _elem72.read(iprot);
1029 struct.columns.add(_elem72);
1030 }
1031 iprot.readListEnd();
1032 }
1033 struct.setColumnsIsSet(true);
1034 } else {
1035 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1036 }
1037 break;
1038 case 4:
1039 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1040 struct.caching = iprot.readI32();
1041 struct.setCachingIsSet(true);
1042 } else {
1043 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1044 }
1045 break;
1046 case 5:
1047 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1048 struct.maxVersions = iprot.readI32();
1049 struct.setMaxVersionsIsSet(true);
1050 } else {
1051 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1052 }
1053 break;
1054 case 6:
1055 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
1056 struct.timeRange = new TTimeRange();
1057 struct.timeRange.read(iprot);
1058 struct.setTimeRangeIsSet(true);
1059 } else {
1060 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1061 }
1062 break;
1063 case 7:
1064 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
1065 struct.filterString = iprot.readBinary();
1066 struct.setFilterStringIsSet(true);
1067 } else {
1068 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1069 }
1070 break;
1071 case 8:
1072 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
1073 struct.batchSize = iprot.readI32();
1074 struct.setBatchSizeIsSet(true);
1075 } else {
1076 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1077 }
1078 break;
1079 case 9:
1080 if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
1081 {
1082 org.apache.thrift.protocol.TMap _map73 = iprot.readMapBegin();
1083 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map73.size);
1084 for (int _i74 = 0; _i74 < _map73.size; ++_i74)
1085 {
1086 ByteBuffer _key75;
1087 ByteBuffer _val76;
1088 _key75 = iprot.readBinary();
1089 _val76 = iprot.readBinary();
1090 struct.attributes.put(_key75, _val76);
1091 }
1092 iprot.readMapEnd();
1093 }
1094 struct.setAttributesIsSet(true);
1095 } else {
1096 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1097 }
1098 break;
1099 default:
1100 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
1101 }
1102 iprot.readFieldEnd();
1103 }
1104 iprot.readStructEnd();
1105
1106
1107 struct.validate();
1108 }
1109
1110 public void write(org.apache.thrift.protocol.TProtocol oprot, TScan struct) throws org.apache.thrift.TException {
1111 struct.validate();
1112
1113 oprot.writeStructBegin(STRUCT_DESC);
1114 if (struct.startRow != null) {
1115 if (struct.isSetStartRow()) {
1116 oprot.writeFieldBegin(START_ROW_FIELD_DESC);
1117 oprot.writeBinary(struct.startRow);
1118 oprot.writeFieldEnd();
1119 }
1120 }
1121 if (struct.stopRow != null) {
1122 if (struct.isSetStopRow()) {
1123 oprot.writeFieldBegin(STOP_ROW_FIELD_DESC);
1124 oprot.writeBinary(struct.stopRow);
1125 oprot.writeFieldEnd();
1126 }
1127 }
1128 if (struct.columns != null) {
1129 if (struct.isSetColumns()) {
1130 oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
1131 {
1132 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
1133 for (TColumn _iter77 : struct.columns)
1134 {
1135 _iter77.write(oprot);
1136 }
1137 oprot.writeListEnd();
1138 }
1139 oprot.writeFieldEnd();
1140 }
1141 }
1142 if (struct.isSetCaching()) {
1143 oprot.writeFieldBegin(CACHING_FIELD_DESC);
1144 oprot.writeI32(struct.caching);
1145 oprot.writeFieldEnd();
1146 }
1147 if (struct.isSetMaxVersions()) {
1148 oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
1149 oprot.writeI32(struct.maxVersions);
1150 oprot.writeFieldEnd();
1151 }
1152 if (struct.timeRange != null) {
1153 if (struct.isSetTimeRange()) {
1154 oprot.writeFieldBegin(TIME_RANGE_FIELD_DESC);
1155 struct.timeRange.write(oprot);
1156 oprot.writeFieldEnd();
1157 }
1158 }
1159 if (struct.filterString != null) {
1160 if (struct.isSetFilterString()) {
1161 oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC);
1162 oprot.writeBinary(struct.filterString);
1163 oprot.writeFieldEnd();
1164 }
1165 }
1166 if (struct.isSetBatchSize()) {
1167 oprot.writeFieldBegin(BATCH_SIZE_FIELD_DESC);
1168 oprot.writeI32(struct.batchSize);
1169 oprot.writeFieldEnd();
1170 }
1171 if (struct.attributes != null) {
1172 if (struct.isSetAttributes()) {
1173 oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
1174 {
1175 oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
1176 for (Map.Entry<ByteBuffer, ByteBuffer> _iter78 : struct.attributes.entrySet())
1177 {
1178 oprot.writeBinary(_iter78.getKey());
1179 oprot.writeBinary(_iter78.getValue());
1180 }
1181 oprot.writeMapEnd();
1182 }
1183 oprot.writeFieldEnd();
1184 }
1185 }
1186 oprot.writeFieldStop();
1187 oprot.writeStructEnd();
1188 }
1189
1190 }
1191
1192 private static class TScanTupleSchemeFactory implements SchemeFactory {
1193 public TScanTupleScheme getScheme() {
1194 return new TScanTupleScheme();
1195 }
1196 }
1197
1198 private static class TScanTupleScheme extends TupleScheme<TScan> {
1199
1200 @Override
1201 public void write(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
1202 TTupleProtocol oprot = (TTupleProtocol) prot;
1203 BitSet optionals = new BitSet();
1204 if (struct.isSetStartRow()) {
1205 optionals.set(0);
1206 }
1207 if (struct.isSetStopRow()) {
1208 optionals.set(1);
1209 }
1210 if (struct.isSetColumns()) {
1211 optionals.set(2);
1212 }
1213 if (struct.isSetCaching()) {
1214 optionals.set(3);
1215 }
1216 if (struct.isSetMaxVersions()) {
1217 optionals.set(4);
1218 }
1219 if (struct.isSetTimeRange()) {
1220 optionals.set(5);
1221 }
1222 if (struct.isSetFilterString()) {
1223 optionals.set(6);
1224 }
1225 if (struct.isSetBatchSize()) {
1226 optionals.set(7);
1227 }
1228 if (struct.isSetAttributes()) {
1229 optionals.set(8);
1230 }
1231 oprot.writeBitSet(optionals, 9);
1232 if (struct.isSetStartRow()) {
1233 oprot.writeBinary(struct.startRow);
1234 }
1235 if (struct.isSetStopRow()) {
1236 oprot.writeBinary(struct.stopRow);
1237 }
1238 if (struct.isSetColumns()) {
1239 {
1240 oprot.writeI32(struct.columns.size());
1241 for (TColumn _iter79 : struct.columns)
1242 {
1243 _iter79.write(oprot);
1244 }
1245 }
1246 }
1247 if (struct.isSetCaching()) {
1248 oprot.writeI32(struct.caching);
1249 }
1250 if (struct.isSetMaxVersions()) {
1251 oprot.writeI32(struct.maxVersions);
1252 }
1253 if (struct.isSetTimeRange()) {
1254 struct.timeRange.write(oprot);
1255 }
1256 if (struct.isSetFilterString()) {
1257 oprot.writeBinary(struct.filterString);
1258 }
1259 if (struct.isSetBatchSize()) {
1260 oprot.writeI32(struct.batchSize);
1261 }
1262 if (struct.isSetAttributes()) {
1263 {
1264 oprot.writeI32(struct.attributes.size());
1265 for (Map.Entry<ByteBuffer, ByteBuffer> _iter80 : struct.attributes.entrySet())
1266 {
1267 oprot.writeBinary(_iter80.getKey());
1268 oprot.writeBinary(_iter80.getValue());
1269 }
1270 }
1271 }
1272 }
1273
1274 @Override
1275 public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
1276 TTupleProtocol iprot = (TTupleProtocol) prot;
1277 BitSet incoming = iprot.readBitSet(9);
1278 if (incoming.get(0)) {
1279 struct.startRow = iprot.readBinary();
1280 struct.setStartRowIsSet(true);
1281 }
1282 if (incoming.get(1)) {
1283 struct.stopRow = iprot.readBinary();
1284 struct.setStopRowIsSet(true);
1285 }
1286 if (incoming.get(2)) {
1287 {
1288 org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
1289 struct.columns = new ArrayList<TColumn>(_list81.size);
1290 for (int _i82 = 0; _i82 < _list81.size; ++_i82)
1291 {
1292 TColumn _elem83;
1293 _elem83 = new TColumn();
1294 _elem83.read(iprot);
1295 struct.columns.add(_elem83);
1296 }
1297 }
1298 struct.setColumnsIsSet(true);
1299 }
1300 if (incoming.get(3)) {
1301 struct.caching = iprot.readI32();
1302 struct.setCachingIsSet(true);
1303 }
1304 if (incoming.get(4)) {
1305 struct.maxVersions = iprot.readI32();
1306 struct.setMaxVersionsIsSet(true);
1307 }
1308 if (incoming.get(5)) {
1309 struct.timeRange = new TTimeRange();
1310 struct.timeRange.read(iprot);
1311 struct.setTimeRangeIsSet(true);
1312 }
1313 if (incoming.get(6)) {
1314 struct.filterString = iprot.readBinary();
1315 struct.setFilterStringIsSet(true);
1316 }
1317 if (incoming.get(7)) {
1318 struct.batchSize = iprot.readI32();
1319 struct.setBatchSizeIsSet(true);
1320 }
1321 if (incoming.get(8)) {
1322 {
1323 org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
1324 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map84.size);
1325 for (int _i85 = 0; _i85 < _map84.size; ++_i85)
1326 {
1327 ByteBuffer _key86;
1328 ByteBuffer _val87;
1329 _key86 = iprot.readBinary();
1330 _val87 = iprot.readBinary();
1331 struct.attributes.put(_key86, _val87);
1332 }
1333 }
1334 struct.setAttributesIsSet(true);
1335 }
1336 }
1337 }
1338
1339 }
1340