@Override
    public void add(Task taskBean) {
        try {
            connection = getConnection();
            ptmt = connection.prepareStatement("INSERT INTO Task(description, title, id_owner) VALUES(?,?,?);");
            ptmt.setString(1, taskBean.getDescription());
            ptmt.setString(2, taskBean.getTitle());
            ptmt.setInt(3, taskBean.getIdOwner());
            ptmt.executeUpdate();
            
        } 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);
            }
        }
        
    }