public static List<Question> getAllQuestions(boolean Validated)
    {
        try
        {
            List<Question> allQuestions = new ArrayList<Question>();
            String query = "Select QuestionId from Question ";
            query += String.format("Where IsValidated = %s and IsRejected = False", String.valueOf(Validated) );
            ResultSet rs = getQueryResults(query);
            List<Integer> QuestionIds = new ArrayList<Integer>();
            while (rs.next())
            {
                QuestionIds.add(rs.getInt("QuestionId"));
            }
            for (int qid : QuestionIds)
            {
                allQuestions.add(getQuestionData(qid));
            }
            return allQuestions;
        }
        catch (SQLException ex)
        {
            return null;
        }
        
    }