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; } }