public int compareTo(GetPushNotiTask other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; GetPushNotiTask typedOther = (GetPushNotiTask) other; lastComparison = Boolean.valueOf(isSetCode()).compareTo(typedOther.isSetCode()); if (lastComparison != 0) { return lastComparison; } if (isSetCode()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetInfo()).compareTo(typedOther.isSetInfo()); if (lastComparison != 0) { return lastComparison; } if (isSetInfo()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.info, typedOther.info); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, GetPushNotiTask struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetCode()) { optionals.set(0); } if (struct.isSetInfo()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCode()) { oprot.writeI32(struct.code); } if (struct.isSetInfo()) { struct.info.write(oprot); } }
public boolean equals(GetPushNotiTask that) { if (that == null) return false; boolean this_present_code = true && this.isSetCode(); boolean that_present_code = true && that.isSetCode(); if (this_present_code || that_present_code) { if (!(this_present_code && that_present_code)) return false; if (this.code != that.code) return false; } boolean this_present_info = true && this.isSetInfo(); boolean that_present_info = true && that.isSetInfo(); if (this_present_info || that_present_info) { if (!(this_present_info && that_present_info)) return false; if (!this.info.equals(that.info)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, GetPushNotiTask struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetCode()) { oprot.writeFieldBegin(CODE_FIELD_DESC); oprot.writeI32(struct.code); oprot.writeFieldEnd(); } if (struct.info != null) { if (struct.isSetInfo()) { oprot.writeFieldBegin(INFO_FIELD_DESC); struct.info.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }