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