@Override
 public void write(org.apache.thrift.protocol.TProtocol prot, BankGroupThrift struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetId()) {
     optionals.set(0);
   }
   if (struct.isSetGroupType()) {
     optionals.set(1);
   }
   if (struct.isSetBankId()) {
     optionals.set(2);
   }
   if (struct.isSetBankCode()) {
     optionals.set(3);
   }
   oprot.writeBitSet(optionals, 4);
   if (struct.isSetId()) {
     oprot.writeI32(struct.id);
   }
   if (struct.isSetGroupType()) {
     oprot.writeI32(struct.groupType);
   }
   if (struct.isSetBankId()) {
     oprot.writeI32(struct.bankId);
   }
   if (struct.isSetBankCode()) {
     oprot.writeString(struct.bankCode);
   }
 }
  @Override
  public int compareTo(BankGroupThrift other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGroupType()).compareTo(other.isSetGroupType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroupType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupType, other.groupType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBankId()).compareTo(other.isSetBankId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBankId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bankId, other.bankId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBankCode()).compareTo(other.isSetBankCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBankCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bankCode, other.bankCode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }