class FolderDao extends NamedParameterJdbcDaoSupport {

    public Folder loadFolder(Long id) {
        Collection<Folder> items =
                getJdbcTemplate().query(loadFolderByIdQuery, FolderParameters.getFolderExtractor(false), id);
        if (CollectionUtils.isEmpty(items)) {
            return null;
        } else {
            return items.stream().filter(folder -> folder.getId().equals(id)).findAny().orElse(null);
        }
    }

}