@Override
    public ArrayList<Task> findByExecutor(int id) {
        ArrayList taskList = new ArrayList();
        try {
            connection = getConnection();
            ptmt = connection.prepareStatement(QUERY_SELECT + " WHERE id_executor=?;");
            ptmt.setInt(1, id);
            resultSet = ptmt.executeQuery();
            while (resultSet.next()) {
                Task task = new Task();
                task.setDescription(resultSet.getString(DESCRIPTION));
                task.setTitle(resultSet.getString(TITLE));
                task.setIdtask(resultSet.getInt(ID_TASK));
                task.setIdOwner(resultSet.getInt(ID_OWNER));
                task.setIdExecutor(resultSet.getInt(ID_EXECUTOR));
                task.setActive(resultSet.getBoolean(ACTIVE));
                task.setDone(resultSet.getBoolean(DONE));
                taskList.add(task);
            }
        } catch (SQLException ex) {
            Logger.getLogger(TaskDAO.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                if (ptmt != null) {
                    ptmt.close();
                }
                if (connection != null) {
                    connection.close();
                }
                if (resultSet != null) {
                    resultSet.close();
                }
            } catch (SQLException ex) {
                Logger.getLogger(UserDAO.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return taskList;
    }