Richard Allred
2019-07-24 a0872a3849cde8043ed02c2e4a0487163da27562
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.redhat.training.model;
 
import javax.persistence.*;
 
@Entity
public class Item {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
 
    private String description;
 
    private Boolean done = false;
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getDescription() {
        return description;
    }
 
    public void setDescription(String description) {
        this.description = description;
    }
 
    public Boolean isDone() {
        return done;
    }
 
    public void setDone(Boolean done) {
        this.done = done;
    }
 
    @Override
    public boolean equals(Object o) {
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) { return false; }
 
        Item item = (Item) o;
 
        return id.equals(item.id);
    }
 
    @Override
    public int hashCode() {
        return id.hashCode();
    }
}