@GET
    @Produces(MediaType.APPLICATION_JSON)
    public List<TaskBean> getAllTasks() throws SQLException {
        List<TaskBean> taskListBean = new ArrayList<TaskBean>();
        List<Task> taskList = daoHelper.getList();

        for (Task task : taskList) {
            TaskBean taskBean = new TaskBean(task.getId(), task.getTask(), task.getPriority());
            taskListBean.add(taskBean);
        }
        return taskListBean;
    }