hefeixia
2021-02-18 5b8c95c760840f09910730943b21391e47187315
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package chat.module.entity;
 
import java.util.Date;
 
import chat.user.NotifySubject;
import frame.object.data.DataObject;
import frame.object.data.Entity;
 
public class Notify {
 
    private String id;
    private String sender;
    private String bizid;
    private String roletype;
    private String target;
    private String type;
    private String msgtitle;
    private String msgcontent;
    private Date msgtime;
    private String isread;
    
    private NotifySubject notifyContent;
    
    public static boolean saveNotify(Notify notify) {
        try {
             DataObject dataObject = DataObject.getInstance("notify");
            
             Entity entity = dataObject.newEntity();
             notify.pushTo(entity);
             dataObject.insertToDataBase(entity);
             return true;
        } catch (Exception e) {
            return false;
        }
    }
    
    public void pushTo(Entity entity) throws Exception {
        entity.set("id", id);
        entity.set("sender", sender);
        entity.set("target", target);
        entity.set("type", type);
        entity.set("msgtitle", msgtitle);
        entity.set("msgcontent", msgcontent);
        entity.set("msgtime", msgtime);
        entity.set("isread", isread);
    }
    
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getSender() {
        return sender;
    }
    
    public void setSender(String sender) {
        this.sender = sender;
    }
    
    public String getTarget() {
        return target;
    }
    
    public void setTarget(String target) {
        this.target = target;
    }
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    public String getMsgtitle() {
        return msgtitle;
    }
    
    public void setMsgtitle(String msgtitle) {
        this.msgtitle = msgtitle;
    }
    
    public String getMsgcontent() {
        return msgcontent;
    }
    
    public void setMsgcontent(String msgcontent) {
        this.msgcontent = msgcontent;
    }
 
    public Date getMsgtime() {
        return msgtime;
    }
 
    public void setMsgtime(Date msgtime) {
        this.msgtime = msgtime;
    }
 
    public String getIsread() {
        return isread;
    }
    
    public void setIsread(String isread) {
        this.isread = isread;
    }
    
    public String getBizid() {
        return bizid;
    }
 
    public void setBizid(String bizid) {
        this.bizid = bizid;
    }
 
    public String getRoletype() {
        return roletype;
    }
 
    public void setRoletype(String roletype) {
        this.roletype = roletype;
    }
 
    public NotifySubject getNotifyContent() {
        return notifyContent;
    }
 
    public void setNotifyContent(NotifySubject notifyContent) {
        this.notifyContent = notifyContent;
    }
    
}