Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 760466c

Browse files
Part 25: Add CompanyReadMapper.java
1 parent 4a7245d commit 760466c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package spring.oldboy.mapper;
2+
3+
import org.springframework.stereotype.Component;
4+
import spring.oldboy.database.entity.Company;
5+
import spring.oldboy.dto.CompanyReadDto;
6+
7+
@Component
8+
public class CompanyReadMapper implements Mapper<Company, CompanyReadDto> {
9+
10+
@Override
11+
public CompanyReadDto map(Company object) {
12+
return new CompanyReadDto(
13+
object.getId(),
14+
object.getName()
15+
);
16+
}
17+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /