@Override public int compareTo(TExerciseType other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMyid()).compareTo(other.isSetMyid()); if (lastComparison != 0) { return lastComparison; } if (isSetMyid()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.myid, other.myid); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTypeName()).compareTo(other.isSetTypeName()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeName, other.typeName); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetCreateAt()).compareTo(other.isSetCreateAt()); if (lastComparison != 0) { return lastComparison; } if (isSetCreateAt()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createAt, other.createAt); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetUpdateAt()).compareTo(other.isSetUpdateAt()); if (lastComparison != 0) { return lastComparison; } if (isSetUpdateAt()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateAt, other.updateAt); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetActive()).compareTo(other.isSetActive()); if (lastComparison != 0) { return lastComparison; } if (isSetActive()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.active, other.active); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TExerciseType struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMyid()) { optionals.set(0); } if (struct.isSetTypeName()) { optionals.set(1); } if (struct.isSetCreateAt()) { optionals.set(2); } if (struct.isSetUpdateAt()) { optionals.set(3); } if (struct.isSetActive()) { optionals.set(4); } oprot.writeBitSet(optionals, 5); if (struct.isSetMyid()) { oprot.writeI32(struct.myid); } if (struct.isSetTypeName()) { oprot.writeString(struct.typeName); } if (struct.isSetCreateAt()) { oprot.writeString(struct.createAt); } if (struct.isSetUpdateAt()) { oprot.writeString(struct.updateAt); } if (struct.isSetActive()) { oprot.writeBool(struct.active); } }