@Override
    public List<Tourist> load(Criteria criteria, GenericLoadQuery loadGeneric, Connection conn) throws DaoQueryException {
        int pageSize = 50;

        List paramList = new ArrayList<>();
        StringBuilder sb = new StringBuilder(WHERE);
        String queryStr = new QueryMapper() {
            @Override
            public String mapQuery() {
                Appender.append(DAO_ID_TOURIST, DB_TOURIST_ID_TOURIST, criteria, paramList, sb, AND);
                Appender.append(DAO_ID_ORDER, DB_TOURIST_ID_ORDER, criteria, paramList, sb, AND);
                Appender.append(DAO_TOURIST_FNAME, DB_TOURIST_FNAME, criteria, paramList, sb, AND);
                Appender.append(DAO_TOURIST_MNAME, DB_TOURIST_MNAME, criteria, paramList, sb, AND);
                Appender.append(DAO_TOURIST_LNAME, DB_TOURIST_LNAME, criteria, paramList, sb, AND);
                Appender.append(DAO_TOURIST_BIRTH, DB_TOURIST_BIRTH, criteria, paramList, sb, AND);
                Appender.append(DAO_TOURIST_PASSPORT, DB_TOURIST_PASSPORT, criteria, paramList, sb, AND);
                Appender.append(DAO_TOURIST_STATUS, DB_TOURIST_STATUS, criteria, paramList, sb, AND);
                if (paramList.isEmpty()) {
                    return LOAD_QUERY;
                } else {
                    return sb.insert(0, LOAD_QUERY).toString();
                }
            }
        }.mapQuery();

        try {
            return loadGeneric.sendQuery(queryStr, paramList.toArray(), pageSize, conn, (ResultSet rs, int rowNum) -> {
                Tourist bean = new Tourist();
                bean.setIdTourist(rs.getInt(DB_TOURIST_ID_TOURIST));
                bean.setOrder(new Order(rs.getInt(DB_TOURIST_ID_ORDER)));
                bean.setFirstName(rs.getString(DB_TOURIST_FNAME));
                bean.setMiddleName(rs.getString(DB_TOURIST_MNAME));
                bean.setLastName(rs.getString(DB_TOURIST_LNAME));
                bean.setBirthDate(rs.getDate(DB_TOURIST_BIRTH));
                bean.setPassport(rs.getString(DB_TOURIST_PASSPORT));
                bean.setStatus(rs.getShort(DB_TOURIST_STATUS));
                return bean;
            });
        } catch (DaoException ex) {
             throw new DaoQueryException(ERR_TOURIST_LOAD, ex);
        }
    }