Skip to content

Commit d249cc1

Browse files
committed
LinkEntityDtoRowMapper: modify to make it more genereic.
No functional changes.
1 parent 0f8a45e commit d249cc1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ class LinkEntityDtoRowMapper implements RowMapper<LinkEntityDto> {
2828

2929
@Override
3030
public LinkEntityDto mapRow(ResultSet resultSet, int i) throws SQLException {
31-
Integer collectionId = resultSet.getInt("collection_id");
32-
String collectionSlug = resultSet.getString("collection_slug");
33-
String ownerName = resultSet.getString("owner_name");
31+
Integer id = resultSet.getInt("id");
32+
String slug = resultSet.getString("slug");
33+
String name = resultSet.getString("name");
3434

35-
return new LinkEntityDto(collectionId, collectionSlug, ownerName);
35+
return new LinkEntityDto(id, slug, name);
3636
}
3737

3838
}

src/main/resources/sql/collection_dao_queries.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
collection.find_last_created = \
2-
SELECT DISTINCT c.id AS collection_id \
3-
, c.slug AS collection_slug \
4-
, u.name AS owner_name \
2+
SELECT DISTINCT c.id \
3+
, c.slug \
4+
, u.name \
55
FROM collections_series cs \
66
JOIN collections c \
77
ON c.id = cs.collection_id \

0 commit comments

Comments
 (0)