0001
0002
0003
0004
0005
0006
0007 package org.apache.hive.service.cli.thrift;
0008
0009 import org.apache.commons.lang.builder.HashCodeBuilder;
0010 import org.apache.thrift.scheme.IScheme;
0011 import org.apache.thrift.scheme.SchemeFactory;
0012 import org.apache.thrift.scheme.StandardScheme;
0013
0014 import org.apache.thrift.scheme.TupleScheme;
0015 import org.apache.thrift.protocol.TTupleProtocol;
0016 import org.apache.thrift.protocol.TProtocolException;
0017 import org.apache.thrift.EncodingUtils;
0018 import org.apache.thrift.TException;
0019 import java.util.List;
0020 import java.util.ArrayList;
0021 import java.util.Map;
0022 import java.util.HashMap;
0023 import java.util.EnumMap;
0024 import java.util.Set;
0025 import java.util.HashSet;
0026 import java.util.EnumSet;
0027 import java.util.Collections;
0028 import java.util.BitSet;
0029 import java.nio.ByteBuffer;
0030 import java.util.Arrays;
0031 import org.slf4j.Logger;
0032 import org.slf4j.LoggerFactory;
0033
0034 public class TColumnValue extends org.apache.thrift.TUnion<TColumnValue, TColumnValue._Fields> {
0035 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue");
0036 private static final org.apache.thrift.protocol.TField BOOL_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("boolVal", org.apache.thrift.protocol.TType.STRUCT, (short)1);
0037 private static final org.apache.thrift.protocol.TField BYTE_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("byteVal", org.apache.thrift.protocol.TType.STRUCT, (short)2);
0038 private static final org.apache.thrift.protocol.TField I16_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("i16Val", org.apache.thrift.protocol.TType.STRUCT, (short)3);
0039 private static final org.apache.thrift.protocol.TField I32_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("i32Val", org.apache.thrift.protocol.TType.STRUCT, (short)4);
0040 private static final org.apache.thrift.protocol.TField I64_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("i64Val", org.apache.thrift.protocol.TType.STRUCT, (short)5);
0041 private static final org.apache.thrift.protocol.TField DOUBLE_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleVal", org.apache.thrift.protocol.TType.STRUCT, (short)6);
0042 private static final org.apache.thrift.protocol.TField STRING_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("stringVal", org.apache.thrift.protocol.TType.STRUCT, (short)7);
0043
0044
0045 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0046 BOOL_VAL((short)1, "boolVal"),
0047 BYTE_VAL((short)2, "byteVal"),
0048 I16_VAL((short)3, "i16Val"),
0049 I32_VAL((short)4, "i32Val"),
0050 I64_VAL((short)5, "i64Val"),
0051 DOUBLE_VAL((short)6, "doubleVal"),
0052 STRING_VAL((short)7, "stringVal");
0053
0054 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0055
0056 static {
0057 for (_Fields field : EnumSet.allOf(_Fields.class)) {
0058 byName.put(field.getFieldName(), field);
0059 }
0060 }
0061
0062
0063
0064
0065 public static _Fields findByThriftId(int fieldId) {
0066 switch(fieldId) {
0067 case 1:
0068 return BOOL_VAL;
0069 case 2:
0070 return BYTE_VAL;
0071 case 3:
0072 return I16_VAL;
0073 case 4:
0074 return I32_VAL;
0075 case 5:
0076 return I64_VAL;
0077 case 6:
0078 return DOUBLE_VAL;
0079 case 7:
0080 return STRING_VAL;
0081 default:
0082 return null;
0083 }
0084 }
0085
0086
0087
0088
0089
0090 public static _Fields findByThriftIdOrThrow(int fieldId) {
0091 _Fields fields = findByThriftId(fieldId);
0092 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0093 return fields;
0094 }
0095
0096
0097
0098
0099 public static _Fields findByName(String name) {
0100 return byName.get(name);
0101 }
0102
0103 private final short _thriftId;
0104 private final String _fieldName;
0105
0106 _Fields(short thriftId, String fieldName) {
0107 _thriftId = thriftId;
0108 _fieldName = fieldName;
0109 }
0110
0111 public short getThriftFieldId() {
0112 return _thriftId;
0113 }
0114
0115 public String getFieldName() {
0116 return _fieldName;
0117 }
0118 }
0119
0120 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0121 static {
0122 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0123 tmpMap.put(_Fields.BOOL_VAL, new org.apache.thrift.meta_data.FieldMetaData("boolVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
0124 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBoolValue.class)));
0125 tmpMap.put(_Fields.BYTE_VAL, new org.apache.thrift.meta_data.FieldMetaData("byteVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
0126 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TByteValue.class)));
0127 tmpMap.put(_Fields.I16_VAL, new org.apache.thrift.meta_data.FieldMetaData("i16Val", org.apache.thrift.TFieldRequirementType.DEFAULT,
0128 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI16Value.class)));
0129 tmpMap.put(_Fields.I32_VAL, new org.apache.thrift.meta_data.FieldMetaData("i32Val", org.apache.thrift.TFieldRequirementType.DEFAULT,
0130 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI32Value.class)));
0131 tmpMap.put(_Fields.I64_VAL, new org.apache.thrift.meta_data.FieldMetaData("i64Val", org.apache.thrift.TFieldRequirementType.DEFAULT,
0132 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI64Value.class)));
0133 tmpMap.put(_Fields.DOUBLE_VAL, new org.apache.thrift.meta_data.FieldMetaData("doubleVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
0134 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDoubleValue.class)));
0135 tmpMap.put(_Fields.STRING_VAL, new org.apache.thrift.meta_data.FieldMetaData("stringVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
0136 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStringValue.class)));
0137 metaDataMap = Collections.unmodifiableMap(tmpMap);
0138 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnValue.class, metaDataMap);
0139 }
0140
0141 public TColumnValue() {
0142 super();
0143 }
0144
0145 public TColumnValue(TColumnValue._Fields setField, Object value) {
0146 super(setField, value);
0147 }
0148
0149 public TColumnValue(TColumnValue other) {
0150 super(other);
0151 }
0152 public TColumnValue deepCopy() {
0153 return new TColumnValue(this);
0154 }
0155
0156 public static TColumnValue boolVal(TBoolValue value) {
0157 TColumnValue x = new TColumnValue();
0158 x.setBoolVal(value);
0159 return x;
0160 }
0161
0162 public static TColumnValue byteVal(TByteValue value) {
0163 TColumnValue x = new TColumnValue();
0164 x.setByteVal(value);
0165 return x;
0166 }
0167
0168 public static TColumnValue i16Val(TI16Value value) {
0169 TColumnValue x = new TColumnValue();
0170 x.setI16Val(value);
0171 return x;
0172 }
0173
0174 public static TColumnValue i32Val(TI32Value value) {
0175 TColumnValue x = new TColumnValue();
0176 x.setI32Val(value);
0177 return x;
0178 }
0179
0180 public static TColumnValue i64Val(TI64Value value) {
0181 TColumnValue x = new TColumnValue();
0182 x.setI64Val(value);
0183 return x;
0184 }
0185
0186 public static TColumnValue doubleVal(TDoubleValue value) {
0187 TColumnValue x = new TColumnValue();
0188 x.setDoubleVal(value);
0189 return x;
0190 }
0191
0192 public static TColumnValue stringVal(TStringValue value) {
0193 TColumnValue x = new TColumnValue();
0194 x.setStringVal(value);
0195 return x;
0196 }
0197
0198
0199 @Override
0200 protected void checkType(_Fields setField, Object value) throws ClassCastException {
0201 switch (setField) {
0202 case BOOL_VAL:
0203 if (value instanceof TBoolValue) {
0204 break;
0205 }
0206 throw new ClassCastException("Was expecting value of type TBoolValue for field 'boolVal', but got " + value.getClass().getSimpleName());
0207 case BYTE_VAL:
0208 if (value instanceof TByteValue) {
0209 break;
0210 }
0211 throw new ClassCastException("Was expecting value of type TByteValue for field 'byteVal', but got " + value.getClass().getSimpleName());
0212 case I16_VAL:
0213 if (value instanceof TI16Value) {
0214 break;
0215 }
0216 throw new ClassCastException("Was expecting value of type TI16Value for field 'i16Val', but got " + value.getClass().getSimpleName());
0217 case I32_VAL:
0218 if (value instanceof TI32Value) {
0219 break;
0220 }
0221 throw new ClassCastException("Was expecting value of type TI32Value for field 'i32Val', but got " + value.getClass().getSimpleName());
0222 case I64_VAL:
0223 if (value instanceof TI64Value) {
0224 break;
0225 }
0226 throw new ClassCastException("Was expecting value of type TI64Value for field 'i64Val', but got " + value.getClass().getSimpleName());
0227 case DOUBLE_VAL:
0228 if (value instanceof TDoubleValue) {
0229 break;
0230 }
0231 throw new ClassCastException("Was expecting value of type TDoubleValue for field 'doubleVal', but got " + value.getClass().getSimpleName());
0232 case STRING_VAL:
0233 if (value instanceof TStringValue) {
0234 break;
0235 }
0236 throw new ClassCastException("Was expecting value of type TStringValue for field 'stringVal', but got " + value.getClass().getSimpleName());
0237 default:
0238 throw new IllegalArgumentException("Unknown field id " + setField);
0239 }
0240 }
0241
0242 @Override
0243 protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
0244 _Fields setField = _Fields.findByThriftId(field.id);
0245 if (setField != null) {
0246 switch (setField) {
0247 case BOOL_VAL:
0248 if (field.type == BOOL_VAL_FIELD_DESC.type) {
0249 TBoolValue boolVal;
0250 boolVal = new TBoolValue();
0251 boolVal.read(iprot);
0252 return boolVal;
0253 } else {
0254 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0255 return null;
0256 }
0257 case BYTE_VAL:
0258 if (field.type == BYTE_VAL_FIELD_DESC.type) {
0259 TByteValue byteVal;
0260 byteVal = new TByteValue();
0261 byteVal.read(iprot);
0262 return byteVal;
0263 } else {
0264 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0265 return null;
0266 }
0267 case I16_VAL:
0268 if (field.type == I16_VAL_FIELD_DESC.type) {
0269 TI16Value i16Val;
0270 i16Val = new TI16Value();
0271 i16Val.read(iprot);
0272 return i16Val;
0273 } else {
0274 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0275 return null;
0276 }
0277 case I32_VAL:
0278 if (field.type == I32_VAL_FIELD_DESC.type) {
0279 TI32Value i32Val;
0280 i32Val = new TI32Value();
0281 i32Val.read(iprot);
0282 return i32Val;
0283 } else {
0284 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0285 return null;
0286 }
0287 case I64_VAL:
0288 if (field.type == I64_VAL_FIELD_DESC.type) {
0289 TI64Value i64Val;
0290 i64Val = new TI64Value();
0291 i64Val.read(iprot);
0292 return i64Val;
0293 } else {
0294 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0295 return null;
0296 }
0297 case DOUBLE_VAL:
0298 if (field.type == DOUBLE_VAL_FIELD_DESC.type) {
0299 TDoubleValue doubleVal;
0300 doubleVal = new TDoubleValue();
0301 doubleVal.read(iprot);
0302 return doubleVal;
0303 } else {
0304 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0305 return null;
0306 }
0307 case STRING_VAL:
0308 if (field.type == STRING_VAL_FIELD_DESC.type) {
0309 TStringValue stringVal;
0310 stringVal = new TStringValue();
0311 stringVal.read(iprot);
0312 return stringVal;
0313 } else {
0314 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0315 return null;
0316 }
0317 default:
0318 throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
0319 }
0320 } else {
0321 return null;
0322 }
0323 }
0324
0325 @Override
0326 protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0327 switch (setField_) {
0328 case BOOL_VAL:
0329 TBoolValue boolVal = (TBoolValue)value_;
0330 boolVal.write(oprot);
0331 return;
0332 case BYTE_VAL:
0333 TByteValue byteVal = (TByteValue)value_;
0334 byteVal.write(oprot);
0335 return;
0336 case I16_VAL:
0337 TI16Value i16Val = (TI16Value)value_;
0338 i16Val.write(oprot);
0339 return;
0340 case I32_VAL:
0341 TI32Value i32Val = (TI32Value)value_;
0342 i32Val.write(oprot);
0343 return;
0344 case I64_VAL:
0345 TI64Value i64Val = (TI64Value)value_;
0346 i64Val.write(oprot);
0347 return;
0348 case DOUBLE_VAL:
0349 TDoubleValue doubleVal = (TDoubleValue)value_;
0350 doubleVal.write(oprot);
0351 return;
0352 case STRING_VAL:
0353 TStringValue stringVal = (TStringValue)value_;
0354 stringVal.write(oprot);
0355 return;
0356 default:
0357 throw new IllegalStateException("Cannot write union with unknown field " + setField_);
0358 }
0359 }
0360
0361 @Override
0362 protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
0363 _Fields setField = _Fields.findByThriftId(fieldID);
0364 if (setField != null) {
0365 switch (setField) {
0366 case BOOL_VAL:
0367 TBoolValue boolVal;
0368 boolVal = new TBoolValue();
0369 boolVal.read(iprot);
0370 return boolVal;
0371 case BYTE_VAL:
0372 TByteValue byteVal;
0373 byteVal = new TByteValue();
0374 byteVal.read(iprot);
0375 return byteVal;
0376 case I16_VAL:
0377 TI16Value i16Val;
0378 i16Val = new TI16Value();
0379 i16Val.read(iprot);
0380 return i16Val;
0381 case I32_VAL:
0382 TI32Value i32Val;
0383 i32Val = new TI32Value();
0384 i32Val.read(iprot);
0385 return i32Val;
0386 case I64_VAL:
0387 TI64Value i64Val;
0388 i64Val = new TI64Value();
0389 i64Val.read(iprot);
0390 return i64Val;
0391 case DOUBLE_VAL:
0392 TDoubleValue doubleVal;
0393 doubleVal = new TDoubleValue();
0394 doubleVal.read(iprot);
0395 return doubleVal;
0396 case STRING_VAL:
0397 TStringValue stringVal;
0398 stringVal = new TStringValue();
0399 stringVal.read(iprot);
0400 return stringVal;
0401 default:
0402 throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
0403 }
0404 } else {
0405 throw new TProtocolException("Couldn't find a field with field id " + fieldID);
0406 }
0407 }
0408
0409 @Override
0410 protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0411 switch (setField_) {
0412 case BOOL_VAL:
0413 TBoolValue boolVal = (TBoolValue)value_;
0414 boolVal.write(oprot);
0415 return;
0416 case BYTE_VAL:
0417 TByteValue byteVal = (TByteValue)value_;
0418 byteVal.write(oprot);
0419 return;
0420 case I16_VAL:
0421 TI16Value i16Val = (TI16Value)value_;
0422 i16Val.write(oprot);
0423 return;
0424 case I32_VAL:
0425 TI32Value i32Val = (TI32Value)value_;
0426 i32Val.write(oprot);
0427 return;
0428 case I64_VAL:
0429 TI64Value i64Val = (TI64Value)value_;
0430 i64Val.write(oprot);
0431 return;
0432 case DOUBLE_VAL:
0433 TDoubleValue doubleVal = (TDoubleValue)value_;
0434 doubleVal.write(oprot);
0435 return;
0436 case STRING_VAL:
0437 TStringValue stringVal = (TStringValue)value_;
0438 stringVal.write(oprot);
0439 return;
0440 default:
0441 throw new IllegalStateException("Cannot write union with unknown field " + setField_);
0442 }
0443 }
0444
0445 @Override
0446 protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
0447 switch (setField) {
0448 case BOOL_VAL:
0449 return BOOL_VAL_FIELD_DESC;
0450 case BYTE_VAL:
0451 return BYTE_VAL_FIELD_DESC;
0452 case I16_VAL:
0453 return I16_VAL_FIELD_DESC;
0454 case I32_VAL:
0455 return I32_VAL_FIELD_DESC;
0456 case I64_VAL:
0457 return I64_VAL_FIELD_DESC;
0458 case DOUBLE_VAL:
0459 return DOUBLE_VAL_FIELD_DESC;
0460 case STRING_VAL:
0461 return STRING_VAL_FIELD_DESC;
0462 default:
0463 throw new IllegalArgumentException("Unknown field id " + setField);
0464 }
0465 }
0466
0467 @Override
0468 protected org.apache.thrift.protocol.TStruct getStructDesc() {
0469 return STRUCT_DESC;
0470 }
0471
0472 @Override
0473 protected _Fields enumForId(short id) {
0474 return _Fields.findByThriftIdOrThrow(id);
0475 }
0476
0477 public _Fields fieldForId(int fieldId) {
0478 return _Fields.findByThriftId(fieldId);
0479 }
0480
0481
0482 public TBoolValue getBoolVal() {
0483 if (getSetField() == _Fields.BOOL_VAL) {
0484 return (TBoolValue)getFieldValue();
0485 } else {
0486 throw new RuntimeException("Cannot get field 'boolVal' because union is currently set to " + getFieldDesc(getSetField()).name);
0487 }
0488 }
0489
0490 public void setBoolVal(TBoolValue value) {
0491 if (value == null) throw new NullPointerException();
0492 setField_ = _Fields.BOOL_VAL;
0493 value_ = value;
0494 }
0495
0496 public TByteValue getByteVal() {
0497 if (getSetField() == _Fields.BYTE_VAL) {
0498 return (TByteValue)getFieldValue();
0499 } else {
0500 throw new RuntimeException("Cannot get field 'byteVal' because union is currently set to " + getFieldDesc(getSetField()).name);
0501 }
0502 }
0503
0504 public void setByteVal(TByteValue value) {
0505 if (value == null) throw new NullPointerException();
0506 setField_ = _Fields.BYTE_VAL;
0507 value_ = value;
0508 }
0509
0510 public TI16Value getI16Val() {
0511 if (getSetField() == _Fields.I16_VAL) {
0512 return (TI16Value)getFieldValue();
0513 } else {
0514 throw new RuntimeException("Cannot get field 'i16Val' because union is currently set to " + getFieldDesc(getSetField()).name);
0515 }
0516 }
0517
0518 public void setI16Val(TI16Value value) {
0519 if (value == null) throw new NullPointerException();
0520 setField_ = _Fields.I16_VAL;
0521 value_ = value;
0522 }
0523
0524 public TI32Value getI32Val() {
0525 if (getSetField() == _Fields.I32_VAL) {
0526 return (TI32Value)getFieldValue();
0527 } else {
0528 throw new RuntimeException("Cannot get field 'i32Val' because union is currently set to " + getFieldDesc(getSetField()).name);
0529 }
0530 }
0531
0532 public void setI32Val(TI32Value value) {
0533 if (value == null) throw new NullPointerException();
0534 setField_ = _Fields.I32_VAL;
0535 value_ = value;
0536 }
0537
0538 public TI64Value getI64Val() {
0539 if (getSetField() == _Fields.I64_VAL) {
0540 return (TI64Value)getFieldValue();
0541 } else {
0542 throw new RuntimeException("Cannot get field 'i64Val' because union is currently set to " + getFieldDesc(getSetField()).name);
0543 }
0544 }
0545
0546 public void setI64Val(TI64Value value) {
0547 if (value == null) throw new NullPointerException();
0548 setField_ = _Fields.I64_VAL;
0549 value_ = value;
0550 }
0551
0552 public TDoubleValue getDoubleVal() {
0553 if (getSetField() == _Fields.DOUBLE_VAL) {
0554 return (TDoubleValue)getFieldValue();
0555 } else {
0556 throw new RuntimeException("Cannot get field 'doubleVal' because union is currently set to " + getFieldDesc(getSetField()).name);
0557 }
0558 }
0559
0560 public void setDoubleVal(TDoubleValue value) {
0561 if (value == null) throw new NullPointerException();
0562 setField_ = _Fields.DOUBLE_VAL;
0563 value_ = value;
0564 }
0565
0566 public TStringValue getStringVal() {
0567 if (getSetField() == _Fields.STRING_VAL) {
0568 return (TStringValue)getFieldValue();
0569 } else {
0570 throw new RuntimeException("Cannot get field 'stringVal' because union is currently set to " + getFieldDesc(getSetField()).name);
0571 }
0572 }
0573
0574 public void setStringVal(TStringValue value) {
0575 if (value == null) throw new NullPointerException();
0576 setField_ = _Fields.STRING_VAL;
0577 value_ = value;
0578 }
0579
0580 public boolean isSetBoolVal() {
0581 return setField_ == _Fields.BOOL_VAL;
0582 }
0583
0584
0585 public boolean isSetByteVal() {
0586 return setField_ == _Fields.BYTE_VAL;
0587 }
0588
0589
0590 public boolean isSetI16Val() {
0591 return setField_ == _Fields.I16_VAL;
0592 }
0593
0594
0595 public boolean isSetI32Val() {
0596 return setField_ == _Fields.I32_VAL;
0597 }
0598
0599
0600 public boolean isSetI64Val() {
0601 return setField_ == _Fields.I64_VAL;
0602 }
0603
0604
0605 public boolean isSetDoubleVal() {
0606 return setField_ == _Fields.DOUBLE_VAL;
0607 }
0608
0609
0610 public boolean isSetStringVal() {
0611 return setField_ == _Fields.STRING_VAL;
0612 }
0613
0614
0615 public boolean equals(Object other) {
0616 if (other instanceof TColumnValue) {
0617 return equals((TColumnValue)other);
0618 } else {
0619 return false;
0620 }
0621 }
0622
0623 public boolean equals(TColumnValue other) {
0624 return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
0625 }
0626
0627 @Override
0628 public int compareTo(TColumnValue other) {
0629 int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
0630 if (lastComparison == 0) {
0631 return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
0632 }
0633 return lastComparison;
0634 }
0635
0636
0637 @Override
0638 public int hashCode() {
0639 HashCodeBuilder hcb = new HashCodeBuilder();
0640 hcb.append(this.getClass().getName());
0641 org.apache.thrift.TFieldIdEnum setField = getSetField();
0642 if (setField != null) {
0643 hcb.append(setField.getThriftFieldId());
0644 Object value = getFieldValue();
0645 if (value instanceof org.apache.thrift.TEnum) {
0646 hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue());
0647 } else {
0648 hcb.append(value);
0649 }
0650 }
0651 return hcb.toHashCode();
0652 }
0653 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0654 try {
0655 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0656 } catch (org.apache.thrift.TException te) {
0657 throw new java.io.IOException(te);
0658 }
0659 }
0660
0661
0662 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0663 try {
0664 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0665 } catch (org.apache.thrift.TException te) {
0666 throw new java.io.IOException(te);
0667 }
0668 }
0669
0670
0671 }