public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamTokenTypeBuff) {
     CFBamTokenTypeBuff rhs = (CFBamTokenTypeBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredSchemaDefId() != rhs.getRequiredSchemaDefId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamTokenTypeHBuff) {
     CFBamTokenTypeHBuff rhs = (CFBamTokenTypeHBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredSchemaDefId() != rhs.getRequiredSchemaDefId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamTokenTypeBySchemaIdxKey) {
     CFBamTokenTypeBySchemaIdxKey rhs = (CFBamTokenTypeBySchemaIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredSchemaDefId() != rhs.getRequiredSchemaDefId()) {
       return (false);
     }
     return (true);
   } else {
     boolean retval = super.equals(obj);
     return (retval);
   }
 }
 public void setTokenTypeBuff(CFBamTokenTypeBuff src) {
   super.setTokenDefBuff(src);
   setRequiredSchemaDefId(src.getRequiredSchemaDefId());
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamTokenTypeBuff) {
      CFBamTokenTypeBuff rhs = (CFBamTokenTypeBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamValuePKey) {
      CFBamValuePKey rhs = (CFBamValuePKey) obj;
      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamValueHPKey) {
      CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamTokenTypeHBuff) {
      CFBamTokenTypeHBuff rhs = (CFBamTokenTypeHBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamTokenTypeBySchemaIdxKey) {
      CFBamTokenTypeBySchemaIdxKey rhs = (CFBamTokenTypeBySchemaIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else {
      int retval = super.compareTo(obj);
      return (retval);
    }
  }