<?php
import("com.laurus.core.push.ent.*");

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of AppNotification
 *
 * @author ABC
 */
class AppNotification {
    /*Attributes of Notification table*/
    private $id;
    private $notType;
    private $notSubType;
    /* @var $notification Notification */
    private $notification;
    private $createdDate;
    private $userRegList;
   
    public function getUserRegList() {
        return $this->userRegList;
    }

    public function setUserRegList($userRegList) {
        $this->userRegList = $userRegList;
    }
    /*Attributes of Notification Association table table*/
    private $readStatus;
    private $notificationAssociation;
    private $forUser;
    private $readTime;
    private $subject;
    private $senderId;
    private $clinic;
    private $notificationContent;
    private $profile;
    public function getNotificationContent() {
        return $this->notificationContent;
    }

    public function setNotificationContent($notificationContent) {
        $this->notificationContent = $notificationContent;
    }
   
    public function getProfile() {
        return $this->profile;
    }

    public function setProfile($profile) {
        $this->profile = $profile;
    }

    public function getSenderId() {
        return $this->senderId;
    }

    public function setSenderId($senderId) {
        $this->senderId = $senderId;
    }
    
    public function getSubject() {
        return $this->subject;
    }

    public function setSubject($subject) {
        $this->subject = $subject;
    }
    
    public function getNotType() {
        return $this->notType;
    }

    public function setNotType($notType) {
        $this->notType = $notType;
    }

    public function getNotSubType() {
        return $this->notSubType;
    }

    public function setNotSubType($notSubType) {
        $this->notSubType = $notSubType;
    }
    public function getNotification() {
        return $this->notification;
    }

    public function setNotification($notification) {
        $this->notification = $notification;
    }
    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }
    public function getCreatedDate() {
        return $this->createdDate;
    }

    public function setCreatedDate($createdDate) {
        $this->createdDate = $createdDate;
    }

    public function getReadStatus() {
        return $this->readStatus;
    }

    public function setReadStatus($readStatus) {
        $this->readStatus = $readStatus;
    }

    public function getNotificationAssociation() {
        return $this->notificationAssociation;
    }

    public function setNotificationAssociation($notificationAssociation) {
        $this->notificationAssociation = $notificationAssociation;
    }

    public function getForUser() {
        return $this->forUser;
    }

    public function setForUser($forUser) {
        $this->forUser = $forUser;
    }

    public function getReadTime() {
        return $this->readTime;
    }

    public function setReadTime($readTime) {
        $this->readTime = $readTime;
    }

    public function toJson(){
        $map=new Map();
        $map->put("id", $this->getId());
        $map->put("senderId",$this->getSenderId());
        $map->put("notification", $this->getNotification());
        $map->put("notType", $this->getNotType());
        $map->put("notSubType", $this->getNotSubType());
        $map->put("subject", $this->getSubject());
       
        $map->put("createdDate", $this->getCreatedDate());
        if($this->getNotificationContent() || $this->getNotificationContent()!=null)
            $map->put("notificationContent",$this->getNotificationContent());
        if($this->getNotificationAssociation()!=null){//Only needed when this bean represent notification for the user
            $map->put("readStatus", $this->getReadStatus());
            $map->put("assocId", $this->getNotificationAssociation());
            $map->put("forUser", $this->getForUser());
            $map->put("readTime", $this->getReadTime());
            
            if($this->getProfile()!=null)
            $map->put("profile",$this->getProfile());
        }
        return $map->toJson();
    }

}

?>
