@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);
   }
 }
  public boolean equals(BankGroupThrift that) {
    if (that == null) return false;

    boolean this_present_id = true;
    boolean that_present_id = true;
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id)) return false;
      if (this.id != that.id) return false;
    }

    boolean this_present_groupType = true;
    boolean that_present_groupType = true;
    if (this_present_groupType || that_present_groupType) {
      if (!(this_present_groupType && that_present_groupType)) return false;
      if (this.groupType != that.groupType) return false;
    }

    boolean this_present_bankId = true;
    boolean that_present_bankId = true;
    if (this_present_bankId || that_present_bankId) {
      if (!(this_present_bankId && that_present_bankId)) return false;
      if (this.bankId != that.bankId) return false;
    }

    boolean this_present_bankCode = true && this.isSetBankCode();
    boolean that_present_bankCode = true && that.isSetBankCode();
    if (this_present_bankCode || that_present_bankCode) {
      if (!(this_present_bankCode && that_present_bankCode)) return false;
      if (!this.bankCode.equals(that.bankCode)) return false;
    }

    return true;
  }
 /** Performs a deep copy on <i>other</i>. */
 public BankGroupThrift(BankGroupThrift other) {
   __isset_bitfield = other.__isset_bitfield;
   this.id = other.id;
   this.groupType = other.groupType;
   this.bankId = other.bankId;
   if (other.isSetBankCode()) {
     this.bankCode = other.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;
  }