Skip to content

Commit 53d9b5c

Browse files
committed
CountryDao.findAllAsSelectEntities(): remove unused method.
Should be in dbf3857 commit. No functional changes.
1 parent b01edef commit 53d9b5c

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

src/main/java/ru/mystamps/web/dao/CountryDao.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import ru.mystamps.web.dao.dto.AddCountryDbDto;
2323
import ru.mystamps.web.dao.dto.LinkEntityDto;
24-
import ru.mystamps.web.dao.dto.SelectEntityDto;
2524

2625
public interface CountryDao {
2726
Integer add(AddCountryDbDto country);
@@ -30,7 +29,6 @@ public interface CountryDao {
3029
long countByNameRu(String name);
3130
long countCountriesOfCollection(Integer collectionId);
3231
List<Object[]> getStatisticsOf(Integer collectionId, String lang);
33-
Iterable<SelectEntityDto> findAllAsSelectEntities(String lang);
3432
Iterable<LinkEntityDto> findAllAsLinkEntities(String lang);
3533
LinkEntityDto findOneAsLinkEntity(String slug, String lang);
3634
}

src/main/java/ru/mystamps/web/dao/impl/JdbcCountryDao.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import ru.mystamps.web.dao.CountryDao;
3737
import ru.mystamps.web.dao.dto.AddCountryDbDto;
3838
import ru.mystamps.web.dao.dto.LinkEntityDto;
39-
import ru.mystamps.web.dao.dto.SelectEntityDto;
4039

4140
@RequiredArgsConstructor
4241
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
@@ -62,9 +61,6 @@ public class JdbcCountryDao implements CountryDao {
6261
@Value("${country.count_stamps_by_countries}")
6362
private String countStampsByCountriesSql;
6463

65-
@Value("${country.find_all_countries_names_with_ids}")
66-
private String findCountriesNamesWithIdsSql;
67-
6864
@Value("${country.find_all_countries_names_with_slug}")
6965
private String findCountriesNamesWithSlugSql;
7066

@@ -148,15 +144,6 @@ public List<Object[]> getStatisticsOf(Integer collectionId, String lang) {
148144
);
149145
}
150146

151-
@Override
152-
public Iterable<SelectEntityDto> findAllAsSelectEntities(String lang) {
153-
return jdbcTemplate.query(
154-
findCountriesNamesWithIdsSql,
155-
Collections.singletonMap("lang", lang),
156-
RowMappers::forSelectEntityDto
157-
);
158-
}
159-
160147
@Override
161148
public Iterable<LinkEntityDto> findAllAsLinkEntities(String lang) {
162149
return jdbcTemplate.query(

src/main/resources/sql/country_dao_queries.properties

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ LEFT JOIN countries c \
5151
WHERE cs.collection_id = :collection_id \
5252
GROUP BY s.country_id
5353

54-
country.find_all_countries_names_with_ids = \
55-
SELECT CASE WHEN 'ru' = :lang THEN c.name_ru ELSE c.name END AS name \
56-
, c.id \
57-
FROM countries c \
58-
ORDER BY CASE WHEN 'ru' = :lang THEN c.name_ru ELSE c.name END
59-
6054
country.find_all_countries_names_with_slug = \
6155
SELECT CASE WHEN 'ru' = :lang THEN c.name_ru ELSE c.name END AS name \
6256
, c.slug \

0 commit comments

Comments
 (0)