1 /* 2 * Copyright (c) 2002-2014, Mairie de Paris 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * 1. Redistributions of source code must retain the above copyright notice 10 * and the following disclaimer. 11 * 12 * 2. Redistributions in binary form must reproduce the above copyright notice 13 * and the following disclaimer in the documentation and/or other materials 14 * provided with the distribution. 15 * 16 * 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its 17 * contributors may be used to endorse or promote products derived from 18 * this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 * 32 * License 1.0 33 */ 34 package fr.paris.lutece.plugins.crm.business.notification; 35 36 import java.sql.Timestamp; 37 38 /** 39 * 40 * Notification 41 * 42 */ 43 public class Notification 44 { 45 private int _nIdNotification; 46 private int _nIdDemand; 47 private boolean _bIsRead; 48 private String _strObject; 49 private String _strMessage; 50 private Timestamp _dateCreation; 51 private String _strSender; 52 53 /** 54 * Set the id notification 55 * 56 * @param nIdNotification 57 * the id notification 58 */ 59 public void setIdNotification( int nIdNotification ) 60 { 61 _nIdNotification = nIdNotification; 62 } 63 64 /** 65 * Get the id notification 66 * 67 * @return the id notification 68 */ 69 public int getIdNotification( ) 70 { 71 return _nIdNotification; 72 } 73 74 /** 75 * Set the id demand 76 * 77 * @param nIdDemand 78 * the id demand 79 */ 80 public void setIdDemand( int nIdDemand ) 81 { 82 _nIdDemand = nIdDemand; 83 } 84 85 /** 86 * Get the id demand 87 * 88 * @return the id demand 89 */ 90 public int getIdDemand( ) 91 { 92 return _nIdDemand; 93 } 94 95 /** 96 * Set the object of the notification 97 * 98 * @param strObject 99 * the object 100 */ 101 public void setObject( String strObject ) 102 { 103 _strObject = strObject; 104 } 105 106 /** 107 * Get the object of the notification 108 * 109 * @return the object of the notification 110 */ 111 public String getObject( ) 112 { 113 return _strObject; 114 } 115 116 /** 117 * Set the message of the notification 118 * 119 * @param strMessage 120 * the message of the notification 121 */ 122 public void setMessage( String strMessage ) 123 { 124 _strMessage = strMessage; 125 } 126 127 /** 128 * Get the message of the notification 129 * 130 * @return the message 131 */ 132 public String getMessage( ) 133 { 134 return _strMessage; 135 } 136 137 /** 138 * Set the status of the notification 139 * 140 * @param bIsRead 141 * true if the notification is read, false otherwise 142 */ 143 public void setIsRead( boolean bIsRead ) 144 { 145 _bIsRead = bIsRead; 146 } 147 148 /** 149 * Check if the notification is read or not 150 * 151 * @return true if it is read, false otherwise 152 */ 153 public boolean isRead( ) 154 { 155 return _bIsRead; 156 } 157 158 /** 159 * Set the date creation of the notification 160 * 161 * @param dateCreation 162 * the date creation 163 */ 164 public void setDateCreation( Timestamp dateCreation ) 165 { 166 _dateCreation = dateCreation; 167 } 168 169 /** 170 * Get the date creation of the notification 171 * 172 * @return the date creation of the notification 173 */ 174 public Timestamp getDateCreation( ) 175 { 176 return _dateCreation; 177 } 178 179 /** 180 * Set the sender 181 * 182 * @param strSender 183 * the sender 184 */ 185 public void setSender( String strSender ) 186 { 187 _strSender = strSender; 188 } 189 190 /** 191 * Get the sender 192 * 193 * @return the senders 194 */ 195 public String getSender( ) 196 { 197 return _strSender; 198 } 199 }