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