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
|
package it.niedermann.owncloud.notes.shared.model;
import androidx.annotation.NonNull;
import java.io.Serializable;
import java.util.Calendar;
/**
* DBNote represents a single note from the local SQLite database with all attributes.
* It extends CloudNote with attributes required for local data management.
*/
public class DBNote extends CloudNote implements Item, Serializable {
private final long id;
private final long accountId;
private DBStatus status;
private String excerpt;
private int scrollY;
public DBNote(long id, long remoteId, Calendar modified, String title, String content, boolean favorite, String category, String etag, DBStatus status, long accountId, String excerpt, int scrollY) {
super(remoteId, modified, title, content, favorite, category, etag);
this.id = id;
this.excerpt = excerpt;
this.status = status;
this.accountId = accountId;
this.scrollY = scrollY;
}
public long getId() {
return id;
}
public long getAccountId() {
return accountId;
}
public DBStatus getStatus() {
return status;
}
public void setStatus(DBStatus status) {
this.status = status;
}
public String getExcerpt() {
return excerpt;
}
public void setExcerpt(String excerpt) {
this.excerpt = excerpt;
}
public void setContent(String content) {
super.setContent(content);
}
@Override
public boolean isSection() {
return false;
}
@NonNull
@Override
public String toString() {
return "DBNote{" +
"id=" + id +
", accountId=" + accountId +
", status=" + status +
", excerpt='" + excerpt + '\'' +
'}';
}
public int getScrollY() {
return scrollY;
}
public void setScrollY(int scrollY) {
this.scrollY = scrollY;
}
}
|