public boolean equals(AuthenticationException that) {
    if (that == null) return false;

    boolean this_present_why = true && this.isSetWhy();
    boolean that_present_why = true && that.isSetWhy();
    if (this_present_why || that_present_why) {
      if (!(this_present_why && that_present_why)) return false;
      if (!this.why.equals(that.why)) return false;
    }

    return true;
  }
  public int compareTo(AuthenticationException other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    AuthenticationException typedOther = (AuthenticationException) other;

    lastComparison = Boolean.valueOf(isSetWhy()).compareTo(typedOther.isSetWhy());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWhy()) {
      lastComparison = TBaseHelper.compareTo(why, typedOther.why);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
 /** Performs a deep copy on <i>other</i>. */
 public AuthenticationException(AuthenticationException other) {
   if (other.isSetWhy()) {
     this.why = other.why;
   }
 }