easytests.core.models.TopicModel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
c 1
b 0
f 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A map(TopicEntity) 0 5 1
1
package easytests.core.models;
2
3
import easytests.core.entities.TopicEntity;
4
import easytests.core.models.empty.ModelsListEmpty;
5
import easytests.core.models.empty.SubjectModelEmpty;
6
import java.util.List;
7
import lombok.Data;
8
9
/**
10
 * @author malinink
11
 */
12
@Data
13
public class TopicModel implements TopicModelInterface {
14
    private Integer id;
15
16
    private String name;
17
18
    private SubjectModelInterface subject;
19
20
    private List<QuestionModelInterface> questions;
21
22
    public void map(TopicEntity topicEntity) {
23
        this.setId(topicEntity.getId());
24
        this.setName(topicEntity.getName());
25
        this.setSubject(new SubjectModelEmpty(topicEntity.getSubjectId()));
26
        this.setQuestions(new ModelsListEmpty());
27
    }
28
}
29