| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| NotificationRecipientList |
|
| 1.0;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 org.hibernate.annotations.GenericGenerator; | |
| 19 | import org.hibernate.annotations.Parameter; | |
| 20 | import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; | |
| 21 | ||
| 22 | import javax.persistence.*; | |
| 23 | ||
| 24 | /** | |
| 25 | * This class represents the data structure that will house a default recipient list for a notification channel. | |
| 26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 27 | */ | |
| 28 | @Entity | |
| 29 | @Table(name="KREN_RECIP_LIST_T") | |
| 30 | public class NotificationRecipientList extends PersistableBusinessObjectBase{ | |
| 31 | @Id | |
| 32 | @GeneratedValue(generator="KREN_RECIP_LIST_S") | |
| 33 | @GenericGenerator(name="KREN_RECIP_LIST_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={ | |
| 34 | @Parameter(name="sequence_name",value="KREN_RECIP_LIST_S"), | |
| 35 | @Parameter(name="value_column",value="id") | |
| 36 | }) | |
| 37 | @Column(name="RECIP_LIST_ID") | |
| 38 | private Long id; | |
| 39 | @Column(name="RECIP_TYP_CD", nullable=false) | |
| 40 | private String recipientType; | |
| 41 | @Column(name="RECIP_ID", nullable=false) | |
| 42 | private String recipientId; | |
| 43 | ||
| 44 | @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH, CascadeType.MERGE}) | |
| 45 | @JoinColumn(name="CHNL_ID", insertable=false, updatable=false) | |
| 46 | private NotificationChannel channel; | |
| 47 | ||
| 48 | /** | |
| 49 | * Constructs a NotificationRecipientList.java instance. | |
| 50 | */ | |
| 51 | 0 | public NotificationRecipientList() { |
| 52 | 0 | } |
| 53 | ||
| 54 | /** | |
| 55 | * Gets the channel attribute. | |
| 56 | * @return Returns the channel. | |
| 57 | */ | |
| 58 | public NotificationChannel getChannel() { | |
| 59 | 0 | return channel; |
| 60 | } | |
| 61 | ||
| 62 | ||
| 63 | /** | |
| 64 | * Sets the channel attribute value. | |
| 65 | * @param channel The channel to set. | |
| 66 | */ | |
| 67 | public void setChannel(NotificationChannel channel) { | |
| 68 | 0 | this.channel = channel; |
| 69 | 0 | } |
| 70 | ||
| 71 | /** | |
| 72 | * Gets the id attribute. | |
| 73 | * @return Returns the id. | |
| 74 | */ | |
| 75 | public Long getId() { | |
| 76 | 0 | return id; |
| 77 | } | |
| 78 | ||
| 79 | /** | |
| 80 | * Sets the id attribute value. | |
| 81 | * @param id The id to set. | |
| 82 | */ | |
| 83 | public void setId(Long id) { | |
| 84 | 0 | this.id = id; |
| 85 | 0 | } |
| 86 | ||
| 87 | /** | |
| 88 | * Gets the recipientId attribute. | |
| 89 | * @return Returns the recipientId. | |
| 90 | */ | |
| 91 | public String getRecipientId() { | |
| 92 | 0 | return recipientId; |
| 93 | } | |
| 94 | ||
| 95 | /** | |
| 96 | * Sets the recipientId attribute value. | |
| 97 | * @param recipientId The recipientId to set. | |
| 98 | */ | |
| 99 | public void setRecipientId(String recipientId) { | |
| 100 | 0 | this.recipientId = recipientId; |
| 101 | 0 | } |
| 102 | ||
| 103 | /** | |
| 104 | * Gets the recipientType attribute. | |
| 105 | * @return Returns the recipientType. | |
| 106 | */ | |
| 107 | public String getRecipientType() { | |
| 108 | 0 | return recipientType; |
| 109 | } | |
| 110 | ||
| 111 | /** | |
| 112 | * Sets the recipientType attribute value. | |
| 113 | * @param recipientType The recipientType to set. | |
| 114 | */ | |
| 115 | public void setRecipientType(String recipientType) { | |
| 116 | 0 | this.recipientType = recipientType; |
| 117 | 0 | } |
| 118 | } | |
| 119 |