@Override public int compareTo(TransferMessage other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetOrig_branchId()).compareTo(other.isSetOrig_branchId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrig_branchId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orig_branchId, other.orig_branchId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAmount()).compareTo(other.isSetAmount()); if (lastComparison != 0) { return lastComparison; } if (isSetAmount()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, other.amount); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TransferMessage struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetOrig_branchId()) { optionals.set(0); } if (struct.isSetAmount()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetOrig_branchId()) { struct.orig_branchId.write(oprot); } if (struct.isSetAmount()) { oprot.writeI32(struct.amount); } }