public void updateAllContents() throws SQLException, IOException {
        Connection conn = (Connection) dbHandler.initiateSystemDBConn()[0];

        ArrayList<Task> tasklisttemp = dbHandler.initiateTaskList(conn);
        ArrayList<TimeSpentOnTask> tsotListtemp = dbHandler.initiateTimeSpentOnTaskList(conn);

        for (int i = 0; i < tasklisttemp.size(); i++) {
            for (int j = 0; j < tsotListtemp.size(); j++) {
                if (tasks.get(i).getTaskID() == tsotListtemp.get(j).getTaskID()) {
                    // Run through userList to find the userObject
                    for (int k = 0; k < userList.size(); k++) {
                        if (userList.get(k).getUserID() == tsotListtemp.get(j).getUserID()) {
                            // Add user to the userlist on task
                            tasklisttemp.get(i).addToUserOnTask(userList.get(k));
                        }
                    }
                }
            }
        }

        // Overwrite current lists with new data.
        tsotList = tsotListtemp;
        tasks = tasklisttemp;
    }