| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package easytests.personal.dto; |
||
| 12 | @Data |
||
| 13 | public class IssueStandardTopicPriorityDto { |
||
| 14 | |||
| 15 | private Integer id; |
||
| 16 | |||
| 17 | @NotNull(message = "Topic may not be null") |
||
| 18 | private Integer topicId; |
||
| 19 | |||
| 20 | @NotNull |
||
| 21 | private Boolean isPreferable = false; |
||
| 22 | |||
| 23 | public void map(IssueStandardTopicPriorityModelInterface topicPriorityModel) { |
||
| 24 | this.setId(topicPriorityModel.getId()); |
||
| 25 | this.setTopicId(topicPriorityModel.getTopic().getId()); |
||
| 26 | this.setIsPreferable(topicPriorityModel.getIsPreferable()); |
||
| 27 | } |
||
| 28 | |||
| 29 | public void mapInto(IssueStandardTopicPriorityModelInterface topicPriorityModel, Integer issueStandardId) { |
||
| 30 | topicPriorityModel.setId(this.getId()); |
||
| 31 | topicPriorityModel.setTopic(new TopicModelEmpty(this.getTopicId())); |
||
| 32 | topicPriorityModel.setIsPreferable(this.getIsPreferable()); |
||
| 33 | topicPriorityModel.setIssueStandard(new IssueStandardModelEmpty(issueStandardId)); |
||
| 34 | } |
||
| 36 |