public boolean equals(MiniStruct that) { if (that == null) return false; boolean this_present_my_string = true && this.isSetMy_string(); boolean that_present_my_string = true && that.isSetMy_string(); if (this_present_my_string || that_present_my_string) { if (!(this_present_my_string && that_present_my_string)) return false; if (!this.my_string.equals(that.my_string)) return false; } boolean this_present_my_enum = true && this.isSetMy_enum(); boolean that_present_my_enum = true && that.isSetMy_enum(); if (this_present_my_enum || that_present_my_enum) { if (!(this_present_my_enum && that_present_my_enum)) return false; if (!this.my_enum.equals(that.my_enum)) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_my_string = true && (isSetMy_string()); list.add(present_my_string); if (present_my_string) list.add(my_string); boolean present_my_enum = true && (isSetMy_enum()); list.add(present_my_enum); if (present_my_enum) list.add(my_enum.getValue()); return list.hashCode(); }
case 2: // MY_ENUM if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.my_enum = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.setMy_enumIsSet(true); } else {
public void write(org.apache.thrift.protocol.TProtocol oprot, MiniStruct struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.my_string != null) { if (struct.isSetMy_string()) { oprot.writeFieldBegin(MY_STRING_FIELD_DESC); oprot.writeString(struct.my_string); oprot.writeFieldEnd(); } } if (struct.my_enum != null) { if (struct.isSetMy_enum()) { oprot.writeFieldBegin(MY_ENUM_FIELD_DESC); oprot.writeI32(struct.my_enum.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.my_string = iprot.readString(); struct.setMy_stringIsSet(true); } if (incoming.get(1)) { struct.my_enum = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.setMy_enumIsSet(true); } } }
public boolean equals(MiniStruct that) { if (that == null) return false; boolean this_present_my_string = true && this.isSetMy_string(); boolean that_present_my_string = true && that.isSetMy_string(); if (this_present_my_string || that_present_my_string) { if (!(this_present_my_string && that_present_my_string)) return false; if (!this.my_string.equals(that.my_string)) return false; } boolean this_present_my_enum = true && this.isSetMy_enum(); boolean that_present_my_enum = true && that.isSetMy_enum(); if (this_present_my_enum || that_present_my_enum) { if (!(this_present_my_enum && that_present_my_enum)) return false; if (!this.my_enum.equals(that.my_enum)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMy_string()) { optionals.set(0); } if (struct.isSetMy_enum()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMy_string()) { oprot.writeString(struct.my_string); } if (struct.isSetMy_enum()) { oprot.writeI32(struct.my_enum.getValue()); } }
_val6 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.my_string_enum_map.put(_key5, _val6); for (int _i11 = 0; _i11 < _map8.size; ++_i11) _key9 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); _val10 = iprot.readString(); struct.my_enum_string_map.put(_key9, _val10); for (int _i15 = 0; _i15 < _map12.size; ++_i15) _key13 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); _val14 = new MiniStruct(); _val14.read(iprot); for (int _i19 = 0; _i19 < _map16.size; ++_i19) _key17 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); for (int _i26 = 0; _i26 < _map23.size; ++_i26) _key24 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); _elem37 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.my_enumlist.add(_elem37); _elem43 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.my_enumset.add(_elem43);
public boolean equals(MiniStruct that) { if (that == null) return false; boolean this_present_my_string = true && this.isSetMy_string(); boolean that_present_my_string = true && that.isSetMy_string(); if (this_present_my_string || that_present_my_string) { if (!(this_present_my_string && that_present_my_string)) return false; if (!this.my_string.equals(that.my_string)) return false; } boolean this_present_my_enum = true && this.isSetMy_enum(); boolean that_present_my_enum = true && that.isSetMy_enum(); if (this_present_my_enum || that_present_my_enum) { if (!(this_present_my_enum && that_present_my_enum)) return false; if (!this.my_enum.equals(that.my_enum)) return false; } return true; }
oprot.writeI32(_iter49.getValue().getValue()); for (Map.Entry<MyEnum, String> _iter50 : struct.my_enum_string_map.entrySet()) oprot.writeI32(_iter50.getKey().getValue()); oprot.writeString(_iter50.getValue()); for (Map.Entry<MyEnum, MiniStruct> _iter51 : struct.my_enum_struct_map.entrySet()) oprot.writeI32(_iter51.getKey().getValue()); _iter51.getValue().write(oprot); for (Map.Entry<MyEnum, List<String>> _iter52 : struct.my_enum_stringlist_map.entrySet()) oprot.writeI32(_iter52.getKey().getValue()); for (Map.Entry<MyEnum, List<MiniStruct>> _iter54 : struct.my_enum_structlist_map.entrySet()) oprot.writeI32(_iter54.getKey().getValue()); for (MyEnum _iter58 : struct.my_enumlist) oprot.writeI32(_iter58.getValue()); for (MyEnum _iter60 : struct.my_enumset) oprot.writeI32(_iter60.getValue());
_val82 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.my_string_enum_map.put(_key81, _val82); for (int _i87 = 0; _i87 < _map84.size; ++_i87) _key85 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); _val86 = iprot.readString(); struct.my_enum_string_map.put(_key85, _val86); for (int _i91 = 0; _i91 < _map88.size; ++_i91) _key89 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); _val90 = new MiniStruct(); _val90.read(iprot); for (int _i95 = 0; _i95 < _map92.size; ++_i95) _key93 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); for (int _i102 = 0; _i102 < _map99.size; ++_i102) _key100 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); _elem113 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.my_enumlist.add(_elem113); _elem119 = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.my_enumset.add(_elem119);
public boolean equals(MiniStruct that) { if (that == null) return false; boolean this_present_my_string = true && this.isSetMy_string(); boolean that_present_my_string = true && that.isSetMy_string(); if (this_present_my_string || that_present_my_string) { if (!(this_present_my_string && that_present_my_string)) return false; if (!this.my_string.equals(that.my_string)) return false; } boolean this_present_my_enum = true && this.isSetMy_enum(); boolean that_present_my_enum = true && that.isSetMy_enum(); if (this_present_my_enum || that_present_my_enum) { if (!(this_present_my_enum && that_present_my_enum)) return false; if (!this.my_enum.equals(that.my_enum)) return false; } return true; }
oprot.writeI32(_iter63.getValue().getValue()); for (Map.Entry<MyEnum, String> _iter64 : struct.my_enum_string_map.entrySet()) oprot.writeI32(_iter64.getKey().getValue()); oprot.writeString(_iter64.getValue()); for (Map.Entry<MyEnum, MiniStruct> _iter65 : struct.my_enum_struct_map.entrySet()) oprot.writeI32(_iter65.getKey().getValue()); _iter65.getValue().write(oprot); for (Map.Entry<MyEnum, List<String>> _iter66 : struct.my_enum_stringlist_map.entrySet()) oprot.writeI32(_iter66.getKey().getValue()); for (Map.Entry<MyEnum, List<MiniStruct>> _iter68 : struct.my_enum_structlist_map.entrySet()) oprot.writeI32(_iter68.getKey().getValue()); for (MyEnum _iter72 : struct.my_enumlist) oprot.writeI32(_iter72.getValue()); for (MyEnum _iter74 : struct.my_enumset) oprot.writeI32(_iter74.getValue());
case 2: // MY_ENUM if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.my_enum = org.apache.hadoop.hive.serde2.thrift.test.MyEnum.findByValue(iprot.readI32()); struct.setMy_enumIsSet(true); } else {
public boolean equals(MiniStruct that) { if (that == null) return false; boolean this_present_my_string = true && this.isSetMy_string(); boolean that_present_my_string = true && that.isSetMy_string(); if (this_present_my_string || that_present_my_string) { if (!(this_present_my_string && that_present_my_string)) return false; if (!this.my_string.equals(that.my_string)) return false; } boolean this_present_my_enum = true && this.isSetMy_enum(); boolean that_present_my_enum = true && that.isSetMy_enum(); if (this_present_my_enum || that_present_my_enum) { if (!(this_present_my_enum && that_present_my_enum)) return false; if (!this.my_enum.equals(that.my_enum)) return false; } return true; }
public static MyEnum fromText(String text) { for (MyEnum el : values()) { if (el.getValue().equals(text)) { return el; } } return null; }
case 2: // MY_ENUM if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.my_enum = MyEnum.findByValue(iprot.readI32()); struct.setMy_enumIsSet(true); } else {
public static MyEnum getEnum(String value) { for(MyEnum v : values()) if(v.getValue().equalsIgnoreCase(value)) return v; throw new IllegalArgumentException(); }
case 2: // MY_ENUM if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.my_enum = MyEnum.findByValue(iprot.readI32()); struct.setMy_enumIsSet(true); } else {