easytests.core.models.AnswerModel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A map(AnswerEntity) 0 6 1
1
package easytests.core.models;
2
3
import easytests.core.entities.AnswerEntity;
4
import easytests.core.models.empty.QuestionModelEmpty;
5
import lombok.*;
6
7
/**
8
 * @author rezenbekk
9
 */
10
@Data
11
public class AnswerModel implements AnswerModelInterface {
12
    private Integer id;
13
14
    private String txt;
15
16
    private QuestionModelInterface question;
17
18
    private Integer serialNumber;
19
20
    private Boolean right;
21
22
    public void map(AnswerEntity answerEntity) {
23
        this.setId(answerEntity.getId());
24
        this.setTxt(answerEntity.getTxt());
25
        this.setSerialNumber(answerEntity.getSerialNumber());
26
        this.setQuestion(new QuestionModelEmpty(answerEntity.getQuestionId()));
27
        this.setRight(answerEntity.getRight());
28
    }
29
}
30