@Override
    public ArrayList<User> findAllActive(Boolean active) {
        ArrayList userList = new ArrayList();
        try {
            connection = getConnection();
            ptmt = connection.prepareStatement(QUERY_SELECT + " WHERE active=?;");
            ptmt.setBoolean(1, active);
            resultSet = ptmt.executeQuery();
            while (resultSet.next()) {
                User user = new User();
                user.setId(resultSet.getInt(ID));
                user.setActive(resultSet.getBoolean(ACTIVE));
                user.setEmail(resultSet.getString(EMAIL));
                user.setLastName(resultSet.getString(LAST_NAME));
                user.setLogin(resultSet.getString(LOGIN));
                user.setName(resultSet.getString(NAME));
                user.setPassword(resultSet.getString(PASSWORD));
                user.setBirthday(resultSet.getDate(BIRTHDAY));
                user.setDateOfRegistration(resultSet.getDate(DATE_OF_REGISTRATION));

                userList.add(user);
            }
        } catch (SQLException ex) {
            Logger.getLogger(UserDAO.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 userList;
    }