// Get userid public int getUserId(String username) { logManager.logInfo("Entering 'getUserId(String username)' method"); int userId = 0; try { sqlString = queryBuilder.sqlSelectUserId(username); resultset = executeQuery.executeSelect(sqlString); if (resultset.next()) { userId = resultset.getInt("user_id"); } } catch (Exception exception) { logManager.logError("Exception was thrown and caught in 'getUserId(String username)' method"); } logManager.logInfo("Exiting 'getUserId(String username)' method"); return userId; }