Coverage Report - org.kuali.rice.ken.bo.NotificationMessageDelivery
 
Classes in this File Line Coverage Branch Coverage Complexity
NotificationMessageDelivery
0%
0/24
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2008 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  * 
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  * 
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.ken.bo;
 17  
 
 18  
 import java.sql.Timestamp;
 19  
 
 20  
 import javax.persistence.CascadeType;
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.FetchType;
 24  
 import javax.persistence.Id;
 25  
 import javax.persistence.JoinColumn;
 26  
 import javax.persistence.OneToOne;
 27  
 import javax.persistence.Table;
 28  
 import javax.persistence.Version;
 29  
 
 30  
 import org.apache.commons.lang.builder.ToStringBuilder;
 31  
 
 32  
 /**
 33  
  * This class represents and instance of a NotificationMessageDelivery.  A Notification gets delivered to 
 34  
  * recipients, possibly in various ways.  For each delivery type that a recipient gets sent to them, 
 35  
  * they have an instance of this entity.
 36  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 37  
  */
 38  
 @Entity
 39  
 @Table(name="KREN_NTFCTN_MSG_DELIV_T")
 40  
 public class NotificationMessageDelivery implements Lockable {
 41  
     @Id
 42  
         @Column(name="NTFCTN_MSG_DELIV_ID")
 43  
         private Long id;
 44  
     @Column(name="STAT_CD", nullable=false)
 45  
         private String messageDeliveryStatus;
 46  
     @Column(name="RECIP_ID", nullable=false)
 47  
         private String userRecipientId;
 48  
     @Column(name="SYS_ID", nullable=true)
 49  
         private String deliverySystemId;  // can hold an identifier from the endpoint delivery mechanism system (i.e. workflow id, SMS id, etc)
 50  
         @Column(name="LOCKD_DTTM", nullable=true)
 51  
         private Timestamp lockedDate;
 52  
 
 53  
     /**
 54  
      * Lock column for OJB optimistic locking
 55  
      */
 56  
     @Version
 57  
         @Column(name="VER_NBR")
 58  
         private Integer lockVerNbr;
 59  
     
 60  
     @OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST})
 61  
         @JoinColumn(name="NTFCTN_ID")
 62  
         private Notification notification;
 63  
 
 64  
     /**
 65  
      * Constructs a NotificationMessageDelivery instance.
 66  
      */
 67  0
     public NotificationMessageDelivery() {
 68  0
     }
 69  
     
 70  
     /**
 71  
      * Gets the id attribute. 
 72  
      * @return Returns the id.
 73  
      */
 74  
     public Long getId() {
 75  0
         return id;
 76  
     }
 77  
 
 78  
     /**
 79  
      * Sets the id attribute value.
 80  
      * @param id The id to set.
 81  
      */
 82  
     public void setId(Long id) {
 83  0
         this.id = id;
 84  0
     }
 85  
 
 86  
 
 87  
     /**
 88  
      * Return value of lock column for OJB optimistic locking
 89  
      * @return value of lock column for OJB optimistic locking
 90  
      */
 91  
     public Integer getLockVerNbr() {
 92  0
         return lockVerNbr;
 93  
     }
 94  
 
 95  
     /**
 96  
      * Set value of lock column for OJB optimistic locking
 97  
      * @param lockVerNbr value of lock column for OJB optimistic locking
 98  
      */
 99  
     public void setLockVerNbr(Integer lockVerNbr) {
 100  0
         this.lockVerNbr = lockVerNbr;
 101  0
     }
 102  
 
 103  
     /**
 104  
      * Gets the messageDeliveryStatus attribute. 
 105  
      * @return Returns the messageDeliveryStatus.
 106  
      */
 107  
     public String getMessageDeliveryStatus() {
 108  0
         return messageDeliveryStatus;
 109  
     }
 110  
 
 111  
     /**
 112  
      * Sets the messageDeliveryStatus attribute value.
 113  
      * @param messageDeliveryStatus The messageDeliveryStatus to set.
 114  
      */
 115  
     public void setMessageDeliveryStatus(String deliveryStatus) {
 116  0
         this.messageDeliveryStatus = deliveryStatus;
 117  0
     }
 118  
 
 119  
     /**
 120  
      * Gets the userRecipientId attribute. 
 121  
      * @return Returns the userRecipientId.
 122  
      */
 123  
     public String getUserRecipientId() {
 124  0
         return userRecipientId;
 125  
     }
 126  
 
 127  
     /**
 128  
      * Sets the userRecipientId attribute value.
 129  
      * @param userRecipientId The userRecipientId to set.
 130  
      */
 131  
     public void setUserRecipientId(String userRecipientId) {
 132  0
         this.userRecipientId = userRecipientId;
 133  0
     }
 134  
 
 135  
     /**
 136  
      * Gets the lockedDate attribute. 
 137  
      * @return Returns the lockedDate.
 138  
      */
 139  
     public Timestamp getLockedDate() {
 140  0
         return lockedDate;
 141  
     }
 142  
     
 143  
     /**
 144  
      * Sets the lockedDate attribute value.
 145  
      * @param lockedDate The lockedDate to set.
 146  
      */
 147  
     public void setLockedDate(Timestamp lockedDate) {
 148  0
         this.lockedDate = lockedDate;
 149  0
     }
 150  
 
 151  
     /**
 152  
      * Gets the notification attribute. 
 153  
      * @return Returns the notification.
 154  
      */
 155  
     public Notification getNotification() {
 156  0
         return notification;
 157  
     }
 158  
 
 159  
     /**
 160  
      * Sets the notification attribute value.
 161  
      * @param notification The notification to set.
 162  
      */
 163  
     public void setNotification(Notification notification) {
 164  0
         this.notification = notification;
 165  0
     }
 166  
 
 167  
     /**
 168  
      * @see java.lang.Object#toString()
 169  
      */
 170  
     @Override
 171  
     public String toString() {
 172  0
         return new ToStringBuilder(this)
 173  
                        .append("id", id)
 174  
                        .append("messageDeliveryStatus", messageDeliveryStatus)
 175  
                        .append("userRecipientId", userRecipientId)
 176  
                        .append("deliverySystemId", deliverySystemId)
 177  
                        .append("lockedDate", lockedDate)
 178  
                        .append("notification", notification)
 179  
                        .toString();
 180  
     }
 181  
 
 182  
     /**
 183  
      * Gets the deliverySystemId attribute. 
 184  
      * @return Returns the deliverySystemId.
 185  
      */
 186  
     public String getDeliverySystemId() {
 187  0
         return deliverySystemId;
 188  
     }
 189  
 
 190  
     /**
 191  
      * Sets the deliverySystemId attribute value.
 192  
      * @param deliverySystemId The deliverySystemId to set.
 193  
      */
 194  
     public void setDeliverySystemId(String deliverySystemId) {
 195  0
         this.deliverySystemId = deliverySystemId;
 196  0
     }
 197  
 }