@Override public void write(org.apache.thrift.protocol.TProtocol prot, loginResult struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetResult()) { optionals.set(0); } if (struct.isSetToken()) { optionals.set(1); } if (struct.isSetSpace()) { optionals.set(2); } if (struct.isSetUspace()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetResult()) { struct.result.write(oprot); } if (struct.isSetToken()) { oprot.writeString(struct.token); } if (struct.isSetSpace()) { oprot.writeI32(struct.space); } if (struct.isSetUspace()) { oprot.writeI32(struct.uspace); } }
@Override public int compareTo(loginResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult()); if (lastComparison != 0) { return lastComparison; } if (isSetResult()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSpace()).compareTo(other.isSetSpace()); if (lastComparison != 0) { return lastComparison; } if (isSetSpace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.space, other.space); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUspace()).compareTo(other.isSetUspace()); if (lastComparison != 0) { return lastComparison; } if (isSetUspace()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uspace, other.uspace); if (lastComparison != 0) { return lastComparison; } } return 0; }