blob: 9f471a07291db7b01dc4372be47ef14a5fe9399a (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
package it.niedermann.nextcloud.deck.model.widget.filter;
import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
import java.util.ArrayList;
import java.util.List;
import it.niedermann.nextcloud.deck.model.enums.EDueType;
@Entity()
public class FilterWidget {
@PrimaryKey()
@NonNull
private int id;
private EDueType dueType;
@NonNull
private EWidgetType widgetType;
@Ignore
private List<FilterWidgetAccount> accounts = new ArrayList<>();
@Ignore
private List<FilterWidgetSort> sorts = new ArrayList<>();
public List<FilterWidgetAccount> getAccounts() {
return accounts;
}
public void setAccounts(List<FilterWidgetAccount> accounts) {
this.accounts = accounts;
}
public Integer getId() {
return id;
}
public List<FilterWidgetSort> getSorts() {
return sorts;
}
public void setSorts(List<FilterWidgetSort> sorts) {
this.sorts = sorts;
}
public void setId(int id) {
this.id = id;
}
public EDueType getDueType() {
return dueType;
}
public void setDueType(EDueType dueType) {
this.dueType = dueType;
}
@NonNull
public EWidgetType getWidgetType() {
return widgetType;
}
public void setWidgetType(@NonNull EWidgetType widgetType) {
this.widgetType = widgetType;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FilterWidget)) return false;
FilterWidget that = (FilterWidget) o;
if (id != that.id) return false;
if (dueType != null ? !dueType.equals(that.dueType) : that.dueType != null) return false;
if (accounts != null ? !accounts.equals(that.accounts) : that.accounts != null)
return false;
return sorts != null ? sorts.equals(that.sorts) : that.sorts == null;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (dueType != null ? dueType.hashCode() : 0);
result = 31 * result + (accounts != null ? accounts.hashCode() : 0);
result = 31 * result + (sorts != null ? sorts.hashCode() : 0);
return result;
}
}
|