Project

General

Profile

1
package eu.dnetlib.uoaadmintools.entities;
2

    
3
import com.fasterxml.jackson.annotation.JsonProperty;
4

    
5
import org.springframework.data.annotation.Id;
6

    
7
import java.util.Date;
8
import java.util.List;
9

    
10
public class Question {
11

    
12
    @Id
13
    @JsonProperty("_id")
14
    private String id;
15

    
16
    private String question;
17
    private String answer;
18
    private Date date = new Date();
19
    private boolean isActive = true;
20
    private Float weight;
21
    private int hitCount = 0;
22
    private List<String> topics;
23

    
24
    public Question() {
25
    }
26

    
27
    /*
28
    public Question(String question, String answer, boolean isActive, Float weight, List<String> topics) {
29
        this.question = question;
30
        this.answer = answer;
31
        this.isActive = isActive;
32
        this.weight = weight;
33
        this.topics = topics;
34
        this.hitCount = 0;
35
        this.isActive = true;
36
    }
37
    */
38

    
39
    public String getId() {
40
        return id;
41
    }
42

    
43
    public void setId(String id) {
44
        this.id = id;
45
    }
46

    
47
    public String getQuestion() {
48
        return question;
49
    }
50

    
51
    public void setQuestion(String question) {
52
        this.question = question;
53
    }
54

    
55
    public String getAnswer() {
56
        return answer;
57
    }
58

    
59
    public void setAnswer(String answer) {
60
        this.answer = answer;
61
    }
62

    
63
    public Date getDate() {
64
        return date;
65
    }
66

    
67
    public void setDate(Date date) {
68
        this.date = date;
69
    }
70

    
71
    public boolean getIsActive() {
72
        return isActive;
73
    }
74

    
75
    public void setIsActive(boolean isActive) {
76
        this.isActive = isActive;
77
    }
78

    
79
    public Float getWeight() {
80
        return weight;
81
    }
82

    
83
    public void setWeight(Float weight) {
84
        this.weight = weight;
85
    }
86

    
87
    public int getHitCount() {
88
        return hitCount;
89
    }
90

    
91
    public void setHitCount(int hitCount) {
92
        this.hitCount = hitCount;
93
    }
94

    
95
    public List<String> getTopics() {
96
        return topics;
97
    }
98

    
99
    public void setTopics(List<String> topics) {
100
        this.topics = topics;
101
    }
102

    
103
    public void increment() {
104
        hitCount++;
105
    }
106
}
(19-19/23)