Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.3)
0003  *
0004  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0005  *  @generated
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 TTypeEntry extends org.apache.thrift.TUnion<TTypeEntry, TTypeEntry._Fields> {
0038   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeEntry");
0039   private static final org.apache.thrift.protocol.TField PRIMITIVE_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("primitiveEntry", org.apache.thrift.protocol.TType.STRUCT, (short)1);
0040   private static final org.apache.thrift.protocol.TField ARRAY_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("arrayEntry", org.apache.thrift.protocol.TType.STRUCT, (short)2);
0041   private static final org.apache.thrift.protocol.TField MAP_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("mapEntry", org.apache.thrift.protocol.TType.STRUCT, (short)3);
0042   private static final org.apache.thrift.protocol.TField STRUCT_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("structEntry", org.apache.thrift.protocol.TType.STRUCT, (short)4);
0043   private static final org.apache.thrift.protocol.TField UNION_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("unionEntry", org.apache.thrift.protocol.TType.STRUCT, (short)5);
0044   private static final org.apache.thrift.protocol.TField USER_DEFINED_TYPE_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("userDefinedTypeEntry", org.apache.thrift.protocol.TType.STRUCT, (short)6);
0045 
0046   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
0047   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0048     PRIMITIVE_ENTRY((short)1, "primitiveEntry"),
0049     ARRAY_ENTRY((short)2, "arrayEntry"),
0050     MAP_ENTRY((short)3, "mapEntry"),
0051     STRUCT_ENTRY((short)4, "structEntry"),
0052     UNION_ENTRY((short)5, "unionEntry"),
0053     USER_DEFINED_TYPE_ENTRY((short)6, "userDefinedTypeEntry");
0054 
0055     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0056 
0057     static {
0058       for (_Fields field : EnumSet.allOf(_Fields.class)) {
0059         byName.put(field.getFieldName(), field);
0060       }
0061     }
0062 
0063     /**
0064      * Find the _Fields constant that matches fieldId, or null if its not found.
0065      */
0066     public static _Fields findByThriftId(int fieldId) {
0067       switch(fieldId) {
0068         case 1: // PRIMITIVE_ENTRY
0069           return PRIMITIVE_ENTRY;
0070         case 2: // ARRAY_ENTRY
0071           return ARRAY_ENTRY;
0072         case 3: // MAP_ENTRY
0073           return MAP_ENTRY;
0074         case 4: // STRUCT_ENTRY
0075           return STRUCT_ENTRY;
0076         case 5: // UNION_ENTRY
0077           return UNION_ENTRY;
0078         case 6: // USER_DEFINED_TYPE_ENTRY
0079           return USER_DEFINED_TYPE_ENTRY;
0080         default:
0081           return null;
0082       }
0083     }
0084 
0085     /**
0086      * Find the _Fields constant that matches fieldId, throwing an exception
0087      * if it is not found.
0088      */
0089     public static _Fields findByThriftIdOrThrow(int fieldId) {
0090       _Fields fields = findByThriftId(fieldId);
0091       if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0092       return fields;
0093     }
0094 
0095     /**
0096      * Find the _Fields constant that matches name, or null if its not found.
0097      */
0098     public static _Fields findByName(String name) {
0099       return byName.get(name);
0100     }
0101 
0102     private final short _thriftId;
0103     private final String _fieldName;
0104 
0105     _Fields(short thriftId, String fieldName) {
0106       _thriftId = thriftId;
0107       _fieldName = fieldName;
0108     }
0109 
0110     public short getThriftFieldId() {
0111       return _thriftId;
0112     }
0113 
0114     public String getFieldName() {
0115       return _fieldName;
0116     }
0117   }
0118 
0119   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0120   static {
0121     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0122     tmpMap.put(_Fields.PRIMITIVE_ENTRY, new org.apache.thrift.meta_data.FieldMetaData("primitiveEntry", org.apache.thrift.TFieldRequirementType.DEFAULT, 
0123         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPrimitiveTypeEntry.class)));
0124     tmpMap.put(_Fields.ARRAY_ENTRY, new org.apache.thrift.meta_data.FieldMetaData("arrayEntry", org.apache.thrift.TFieldRequirementType.DEFAULT, 
0125         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TArrayTypeEntry.class)));
0126     tmpMap.put(_Fields.MAP_ENTRY, new org.apache.thrift.meta_data.FieldMetaData("mapEntry", org.apache.thrift.TFieldRequirementType.DEFAULT, 
0127         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TMapTypeEntry.class)));
0128     tmpMap.put(_Fields.STRUCT_ENTRY, new org.apache.thrift.meta_data.FieldMetaData("structEntry", org.apache.thrift.TFieldRequirementType.DEFAULT, 
0129         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStructTypeEntry.class)));
0130     tmpMap.put(_Fields.UNION_ENTRY, new org.apache.thrift.meta_data.FieldMetaData("unionEntry", org.apache.thrift.TFieldRequirementType.DEFAULT, 
0131         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TUnionTypeEntry.class)));
0132     tmpMap.put(_Fields.USER_DEFINED_TYPE_ENTRY, new org.apache.thrift.meta_data.FieldMetaData("userDefinedTypeEntry", org.apache.thrift.TFieldRequirementType.DEFAULT, 
0133         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TUserDefinedTypeEntry.class)));
0134     metaDataMap = Collections.unmodifiableMap(tmpMap);
0135     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTypeEntry.class, metaDataMap);
0136   }
0137 
0138   public TTypeEntry() {
0139     super();
0140   }
0141 
0142   public TTypeEntry(TTypeEntry._Fields setField, Object value) {
0143     super(setField, value);
0144   }
0145 
0146   public TTypeEntry(TTypeEntry other) {
0147     super(other);
0148   }
0149   public TTypeEntry deepCopy() {
0150     return new TTypeEntry(this);
0151   }
0152 
0153   public static TTypeEntry primitiveEntry(TPrimitiveTypeEntry value) {
0154     TTypeEntry x = new TTypeEntry();
0155     x.setPrimitiveEntry(value);
0156     return x;
0157   }
0158 
0159   public static TTypeEntry arrayEntry(TArrayTypeEntry value) {
0160     TTypeEntry x = new TTypeEntry();
0161     x.setArrayEntry(value);
0162     return x;
0163   }
0164 
0165   public static TTypeEntry mapEntry(TMapTypeEntry value) {
0166     TTypeEntry x = new TTypeEntry();
0167     x.setMapEntry(value);
0168     return x;
0169   }
0170 
0171   public static TTypeEntry structEntry(TStructTypeEntry value) {
0172     TTypeEntry x = new TTypeEntry();
0173     x.setStructEntry(value);
0174     return x;
0175   }
0176 
0177   public static TTypeEntry unionEntry(TUnionTypeEntry value) {
0178     TTypeEntry x = new TTypeEntry();
0179     x.setUnionEntry(value);
0180     return x;
0181   }
0182 
0183   public static TTypeEntry userDefinedTypeEntry(TUserDefinedTypeEntry value) {
0184     TTypeEntry x = new TTypeEntry();
0185     x.setUserDefinedTypeEntry(value);
0186     return x;
0187   }
0188 
0189 
0190   @Override
0191   protected void checkType(_Fields setField, Object value) throws ClassCastException {
0192     switch (setField) {
0193       case PRIMITIVE_ENTRY:
0194         if (value instanceof TPrimitiveTypeEntry) {
0195           break;
0196         }
0197         throw new ClassCastException("Was expecting value of type TPrimitiveTypeEntry for field 'primitiveEntry', but got " + value.getClass().getSimpleName());
0198       case ARRAY_ENTRY:
0199         if (value instanceof TArrayTypeEntry) {
0200           break;
0201         }
0202         throw new ClassCastException("Was expecting value of type TArrayTypeEntry for field 'arrayEntry', but got " + value.getClass().getSimpleName());
0203       case MAP_ENTRY:
0204         if (value instanceof TMapTypeEntry) {
0205           break;
0206         }
0207         throw new ClassCastException("Was expecting value of type TMapTypeEntry for field 'mapEntry', but got " + value.getClass().getSimpleName());
0208       case STRUCT_ENTRY:
0209         if (value instanceof TStructTypeEntry) {
0210           break;
0211         }
0212         throw new ClassCastException("Was expecting value of type TStructTypeEntry for field 'structEntry', but got " + value.getClass().getSimpleName());
0213       case UNION_ENTRY:
0214         if (value instanceof TUnionTypeEntry) {
0215           break;
0216         }
0217         throw new ClassCastException("Was expecting value of type TUnionTypeEntry for field 'unionEntry', but got " + value.getClass().getSimpleName());
0218       case USER_DEFINED_TYPE_ENTRY:
0219         if (value instanceof TUserDefinedTypeEntry) {
0220           break;
0221         }
0222         throw new ClassCastException("Was expecting value of type TUserDefinedTypeEntry for field 'userDefinedTypeEntry', but got " + value.getClass().getSimpleName());
0223       default:
0224         throw new IllegalArgumentException("Unknown field id " + setField);
0225     }
0226   }
0227 
0228   @Override
0229   protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
0230     _Fields setField = _Fields.findByThriftId(field.id);
0231     if (setField != null) {
0232       switch (setField) {
0233         case PRIMITIVE_ENTRY:
0234           if (field.type == PRIMITIVE_ENTRY_FIELD_DESC.type) {
0235             TPrimitiveTypeEntry primitiveEntry;
0236             primitiveEntry = new TPrimitiveTypeEntry();
0237             primitiveEntry.read(iprot);
0238             return primitiveEntry;
0239           } else {
0240             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0241             return null;
0242           }
0243         case ARRAY_ENTRY:
0244           if (field.type == ARRAY_ENTRY_FIELD_DESC.type) {
0245             TArrayTypeEntry arrayEntry;
0246             arrayEntry = new TArrayTypeEntry();
0247             arrayEntry.read(iprot);
0248             return arrayEntry;
0249           } else {
0250             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0251             return null;
0252           }
0253         case MAP_ENTRY:
0254           if (field.type == MAP_ENTRY_FIELD_DESC.type) {
0255             TMapTypeEntry mapEntry;
0256             mapEntry = new TMapTypeEntry();
0257             mapEntry.read(iprot);
0258             return mapEntry;
0259           } else {
0260             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0261             return null;
0262           }
0263         case STRUCT_ENTRY:
0264           if (field.type == STRUCT_ENTRY_FIELD_DESC.type) {
0265             TStructTypeEntry structEntry;
0266             structEntry = new TStructTypeEntry();
0267             structEntry.read(iprot);
0268             return structEntry;
0269           } else {
0270             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0271             return null;
0272           }
0273         case UNION_ENTRY:
0274           if (field.type == UNION_ENTRY_FIELD_DESC.type) {
0275             TUnionTypeEntry unionEntry;
0276             unionEntry = new TUnionTypeEntry();
0277             unionEntry.read(iprot);
0278             return unionEntry;
0279           } else {
0280             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0281             return null;
0282           }
0283         case USER_DEFINED_TYPE_ENTRY:
0284           if (field.type == USER_DEFINED_TYPE_ENTRY_FIELD_DESC.type) {
0285             TUserDefinedTypeEntry userDefinedTypeEntry;
0286             userDefinedTypeEntry = new TUserDefinedTypeEntry();
0287             userDefinedTypeEntry.read(iprot);
0288             return userDefinedTypeEntry;
0289           } else {
0290             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0291             return null;
0292           }
0293         default:
0294           throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
0295       }
0296     } else {
0297       org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
0298       return null;
0299     }
0300   }
0301 
0302   @Override
0303   protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0304     switch (setField_) {
0305       case PRIMITIVE_ENTRY:
0306         TPrimitiveTypeEntry primitiveEntry = (TPrimitiveTypeEntry)value_;
0307         primitiveEntry.write(oprot);
0308         return;
0309       case ARRAY_ENTRY:
0310         TArrayTypeEntry arrayEntry = (TArrayTypeEntry)value_;
0311         arrayEntry.write(oprot);
0312         return;
0313       case MAP_ENTRY:
0314         TMapTypeEntry mapEntry = (TMapTypeEntry)value_;
0315         mapEntry.write(oprot);
0316         return;
0317       case STRUCT_ENTRY:
0318         TStructTypeEntry structEntry = (TStructTypeEntry)value_;
0319         structEntry.write(oprot);
0320         return;
0321       case UNION_ENTRY:
0322         TUnionTypeEntry unionEntry = (TUnionTypeEntry)value_;
0323         unionEntry.write(oprot);
0324         return;
0325       case USER_DEFINED_TYPE_ENTRY:
0326         TUserDefinedTypeEntry userDefinedTypeEntry = (TUserDefinedTypeEntry)value_;
0327         userDefinedTypeEntry.write(oprot);
0328         return;
0329       default:
0330         throw new IllegalStateException("Cannot write union with unknown field " + setField_);
0331     }
0332   }
0333 
0334   @Override
0335   protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
0336     _Fields setField = _Fields.findByThriftId(fieldID);
0337     if (setField != null) {
0338       switch (setField) {
0339         case PRIMITIVE_ENTRY:
0340           TPrimitiveTypeEntry primitiveEntry;
0341           primitiveEntry = new TPrimitiveTypeEntry();
0342           primitiveEntry.read(iprot);
0343           return primitiveEntry;
0344         case ARRAY_ENTRY:
0345           TArrayTypeEntry arrayEntry;
0346           arrayEntry = new TArrayTypeEntry();
0347           arrayEntry.read(iprot);
0348           return arrayEntry;
0349         case MAP_ENTRY:
0350           TMapTypeEntry mapEntry;
0351           mapEntry = new TMapTypeEntry();
0352           mapEntry.read(iprot);
0353           return mapEntry;
0354         case STRUCT_ENTRY:
0355           TStructTypeEntry structEntry;
0356           structEntry = new TStructTypeEntry();
0357           structEntry.read(iprot);
0358           return structEntry;
0359         case UNION_ENTRY:
0360           TUnionTypeEntry unionEntry;
0361           unionEntry = new TUnionTypeEntry();
0362           unionEntry.read(iprot);
0363           return unionEntry;
0364         case USER_DEFINED_TYPE_ENTRY:
0365           TUserDefinedTypeEntry userDefinedTypeEntry;
0366           userDefinedTypeEntry = new TUserDefinedTypeEntry();
0367           userDefinedTypeEntry.read(iprot);
0368           return userDefinedTypeEntry;
0369         default:
0370           throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
0371       }
0372     } else {
0373       throw new TProtocolException("Couldn't find a field with field id " + fieldID);
0374     }
0375   }
0376 
0377   @Override
0378   protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0379     switch (setField_) {
0380       case PRIMITIVE_ENTRY:
0381         TPrimitiveTypeEntry primitiveEntry = (TPrimitiveTypeEntry)value_;
0382         primitiveEntry.write(oprot);
0383         return;
0384       case ARRAY_ENTRY:
0385         TArrayTypeEntry arrayEntry = (TArrayTypeEntry)value_;
0386         arrayEntry.write(oprot);
0387         return;
0388       case MAP_ENTRY:
0389         TMapTypeEntry mapEntry = (TMapTypeEntry)value_;
0390         mapEntry.write(oprot);
0391         return;
0392       case STRUCT_ENTRY:
0393         TStructTypeEntry structEntry = (TStructTypeEntry)value_;
0394         structEntry.write(oprot);
0395         return;
0396       case UNION_ENTRY:
0397         TUnionTypeEntry unionEntry = (TUnionTypeEntry)value_;
0398         unionEntry.write(oprot);
0399         return;
0400       case USER_DEFINED_TYPE_ENTRY:
0401         TUserDefinedTypeEntry userDefinedTypeEntry = (TUserDefinedTypeEntry)value_;
0402         userDefinedTypeEntry.write(oprot);
0403         return;
0404       default:
0405         throw new IllegalStateException("Cannot write union with unknown field " + setField_);
0406     }
0407   }
0408 
0409   @Override
0410   protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
0411     switch (setField) {
0412       case PRIMITIVE_ENTRY:
0413         return PRIMITIVE_ENTRY_FIELD_DESC;
0414       case ARRAY_ENTRY:
0415         return ARRAY_ENTRY_FIELD_DESC;
0416       case MAP_ENTRY:
0417         return MAP_ENTRY_FIELD_DESC;
0418       case STRUCT_ENTRY:
0419         return STRUCT_ENTRY_FIELD_DESC;
0420       case UNION_ENTRY:
0421         return UNION_ENTRY_FIELD_DESC;
0422       case USER_DEFINED_TYPE_ENTRY:
0423         return USER_DEFINED_TYPE_ENTRY_FIELD_DESC;
0424       default:
0425         throw new IllegalArgumentException("Unknown field id " + setField);
0426     }
0427   }
0428 
0429   @Override
0430   protected org.apache.thrift.protocol.TStruct getStructDesc() {
0431     return STRUCT_DESC;
0432   }
0433 
0434   @Override
0435   protected _Fields enumForId(short id) {
0436     return _Fields.findByThriftIdOrThrow(id);
0437   }
0438 
0439   public _Fields fieldForId(int fieldId) {
0440     return _Fields.findByThriftId(fieldId);
0441   }
0442 
0443 
0444   public TPrimitiveTypeEntry getPrimitiveEntry() {
0445     if (getSetField() == _Fields.PRIMITIVE_ENTRY) {
0446       return (TPrimitiveTypeEntry)getFieldValue();
0447     } else {
0448       throw new RuntimeException("Cannot get field 'primitiveEntry' because union is currently set to " + getFieldDesc(getSetField()).name);
0449     }
0450   }
0451 
0452   public void setPrimitiveEntry(TPrimitiveTypeEntry value) {
0453     if (value == null) throw new NullPointerException();
0454     setField_ = _Fields.PRIMITIVE_ENTRY;
0455     value_ = value;
0456   }
0457 
0458   public TArrayTypeEntry getArrayEntry() {
0459     if (getSetField() == _Fields.ARRAY_ENTRY) {
0460       return (TArrayTypeEntry)getFieldValue();
0461     } else {
0462       throw new RuntimeException("Cannot get field 'arrayEntry' because union is currently set to " + getFieldDesc(getSetField()).name);
0463     }
0464   }
0465 
0466   public void setArrayEntry(TArrayTypeEntry value) {
0467     if (value == null) throw new NullPointerException();
0468     setField_ = _Fields.ARRAY_ENTRY;
0469     value_ = value;
0470   }
0471 
0472   public TMapTypeEntry getMapEntry() {
0473     if (getSetField() == _Fields.MAP_ENTRY) {
0474       return (TMapTypeEntry)getFieldValue();
0475     } else {
0476       throw new RuntimeException("Cannot get field 'mapEntry' because union is currently set to " + getFieldDesc(getSetField()).name);
0477     }
0478   }
0479 
0480   public void setMapEntry(TMapTypeEntry value) {
0481     if (value == null) throw new NullPointerException();
0482     setField_ = _Fields.MAP_ENTRY;
0483     value_ = value;
0484   }
0485 
0486   public TStructTypeEntry getStructEntry() {
0487     if (getSetField() == _Fields.STRUCT_ENTRY) {
0488       return (TStructTypeEntry)getFieldValue();
0489     } else {
0490       throw new RuntimeException("Cannot get field 'structEntry' because union is currently set to " + getFieldDesc(getSetField()).name);
0491     }
0492   }
0493 
0494   public void setStructEntry(TStructTypeEntry value) {
0495     if (value == null) throw new NullPointerException();
0496     setField_ = _Fields.STRUCT_ENTRY;
0497     value_ = value;
0498   }
0499 
0500   public TUnionTypeEntry getUnionEntry() {
0501     if (getSetField() == _Fields.UNION_ENTRY) {
0502       return (TUnionTypeEntry)getFieldValue();
0503     } else {
0504       throw new RuntimeException("Cannot get field 'unionEntry' because union is currently set to " + getFieldDesc(getSetField()).name);
0505     }
0506   }
0507 
0508   public void setUnionEntry(TUnionTypeEntry value) {
0509     if (value == null) throw new NullPointerException();
0510     setField_ = _Fields.UNION_ENTRY;
0511     value_ = value;
0512   }
0513 
0514   public TUserDefinedTypeEntry getUserDefinedTypeEntry() {
0515     if (getSetField() == _Fields.USER_DEFINED_TYPE_ENTRY) {
0516       return (TUserDefinedTypeEntry)getFieldValue();
0517     } else {
0518       throw new RuntimeException("Cannot get field 'userDefinedTypeEntry' because union is currently set to " + getFieldDesc(getSetField()).name);
0519     }
0520   }
0521 
0522   public void setUserDefinedTypeEntry(TUserDefinedTypeEntry value) {
0523     if (value == null) throw new NullPointerException();
0524     setField_ = _Fields.USER_DEFINED_TYPE_ENTRY;
0525     value_ = value;
0526   }
0527 
0528   public boolean isSetPrimitiveEntry() {
0529     return setField_ == _Fields.PRIMITIVE_ENTRY;
0530   }
0531 
0532 
0533   public boolean isSetArrayEntry() {
0534     return setField_ == _Fields.ARRAY_ENTRY;
0535   }
0536 
0537 
0538   public boolean isSetMapEntry() {
0539     return setField_ == _Fields.MAP_ENTRY;
0540   }
0541 
0542 
0543   public boolean isSetStructEntry() {
0544     return setField_ == _Fields.STRUCT_ENTRY;
0545   }
0546 
0547 
0548   public boolean isSetUnionEntry() {
0549     return setField_ == _Fields.UNION_ENTRY;
0550   }
0551 
0552 
0553   public boolean isSetUserDefinedTypeEntry() {
0554     return setField_ == _Fields.USER_DEFINED_TYPE_ENTRY;
0555   }
0556 
0557 
0558   public boolean equals(Object other) {
0559     if (other instanceof TTypeEntry) {
0560       return equals((TTypeEntry)other);
0561     } else {
0562       return false;
0563     }
0564   }
0565 
0566   public boolean equals(TTypeEntry other) {
0567     return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
0568   }
0569 
0570   @Override
0571   public int compareTo(TTypeEntry other) {
0572     int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
0573     if (lastComparison == 0) {
0574       return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
0575     }
0576     return lastComparison;
0577   }
0578 
0579 
0580   @Override
0581   public int hashCode() {
0582     List<Object> list = new ArrayList<Object>();
0583     list.add(this.getClass().getName());
0584     org.apache.thrift.TFieldIdEnum setField = getSetField();
0585     if (setField != null) {
0586       list.add(setField.getThriftFieldId());
0587       Object value = getFieldValue();
0588       if (value instanceof org.apache.thrift.TEnum) {
0589         list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue());
0590       } else {
0591         list.add(value);
0592       }
0593     }
0594     return list.hashCode();
0595   }
0596   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0597     try {
0598       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0599     } catch (org.apache.thrift.TException te) {
0600       throw new java.io.IOException(te);
0601     }
0602   }
0603 
0604 
0605   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0606     try {
0607       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0608     } catch (org.apache.thrift.TException te) {
0609       throw new java.io.IOException(te);
0610     }
0611   }
0612 
0613 
0614 }