public int getNumberOfHardTokensToGenerate(Admin admin, X509Certificate issuercert){
public int getNumberOfHardTokensToGenerate(Admin admin, String alias){
    public int getNumberOfHardTokensToGenerate(Admin admin, X509Certificate issuercert){      debug(">getNumberOfHardTokensToGenerate()");      int count = 0;      int issuerid = getHardTokenSession().getHardTokenIssuerId(admin, issuercert);      if(issuerid != IHardTokenSessionLocal.NO_ISSUER){        Connection con = null;        PreparedStatement ps = null;        ResultSet rs = null;        try{           // Construct SQL query.            con = getConnection();            ps = con.prepareStatement("select COUNT(*) from UserData where hardTokenIssuerId=? and tokenType>? and (status=? or status=?)");            ps.setInt(1,issuerid);            ps.setInt(2,SecConst.TOKEN_SOFT);			ps.setInt(3,UserDataLocal.STATUS_NEW);			ps.setInt(4,UserDataLocal.STATUS_KEYRECOVERY);            // Execute query.            rs = ps.executeQuery();            // Assemble result.            while(rs.next()){              count = rs.getInt(1);            }        }catch(Exception e){          throw new EJBException(e);        }finally{           try{             if(rs != null) rs.close();             if(ps != null) ps.close();             if(con!= null) con.close();           }catch(SQLException se){               error("Fel vid upprensning: ", se);           }        }      }      debug("<getNumberOfHardTokensToGenerate()");      return count;    }// getNumberOfHardTokensToGenerate