public static HashSet<Exercise> getExerciseRows() {
        Connection conn = ConnectionManager.getInstance().getConnection();
        
        String sql = "{call selectExerciseRows()}";

        try (PreparedStatement stmt = conn.prepareStatement(sql);
                ResultSet rs = stmt.executeQuery();) {

            HashSet<Exercise> hashSet = new HashSet<Exercise>();

            while (rs.next()) {
                Exercise exerciseEntity = new Exercise();
                exerciseEntity.setExerciseNo(rs.getString("exerciseNo"));
                exerciseEntity.setCourseNo(rs.getString("courseNo"));
                exerciseEntity.setAuthor(rs.getString("author"));
                exerciseEntity.setExerciseParameterNo(rs
                        .getString("exerciseParameterNo"));
                exerciseEntity.setExerciseName(rs.getString("exerciseName"));
                exerciseEntity.setDateAdded(rs.getTimestamp("dateAdded"));
                exerciseEntity.setPassword(rs.getString("password"));

                hashSet.add(exerciseEntity);
            }
            return hashSet;

        } catch (SQLTransientConnectionException SQLtce) {
            return getExerciseRows();
        } catch (SQLTransientException SQLte) {
            return getExerciseRows();
        } catch (SQLException e) {
            System.err.println(e);
            return null;
        } finally {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }