blob: 139ce5c1c26767986a7f0891eaf1d5a8d6c4c012 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
|
package it.niedermann.owncloud.notes.persistence.entity;
import androidx.room.Ignore;
import java.util.Objects;
public class CategoryWithNotesCount {
private long accountId;
private String category;
private Integer totalNotes;
public CategoryWithNotesCount() {
// Default constructor for Room
}
@Ignore
public CategoryWithNotesCount(long accountId, String category, Integer totalNotes) {
this.accountId = accountId;
this.category = category;
this.totalNotes = totalNotes;
}
public Integer getTotalNotes() {
return totalNotes;
}
public void setTotalNotes(Integer totalNotes) {
this.totalNotes = totalNotes;
}
public long getAccountId() {
return accountId;
}
public void setAccountId(long accountId) {
this.accountId = accountId;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof CategoryWithNotesCount that)) return false;
if (accountId != that.accountId) return false;
if (!Objects.equals(category, that.category))
return false;
return Objects.equals(totalNotes, that.totalNotes);
}
@Override
public int hashCode() {
int result = (int) (accountId ^ (accountId >>> 32));
result = 31 * result + (category != null ? category.hashCode() : 0);
result = 31 * result + (totalNotes != null ? totalNotes.hashCode() : 0);
return result;
}
}
|