Coverage Report - org.kuali.rice.ken.bo.NotificationProducer
 
Classes in this File Line Coverage Branch Coverage Complexity
NotificationProducer
0%
0/18
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007 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.krad.bo.PersistableBusinessObjectBase;
 21  
 
 22  
 import javax.persistence.*;
 23  
 import java.util.ArrayList;
 24  
 import java.util.List;
 25  
 
 26  
 /**
 27  
  * This class represents an instance of who can actually submit notification messages to the system 
 28  
  * for processing.
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  */
 31  
 @Entity
 32  
 @Table(name="KREN_PRODCR_T")
 33  
 public class NotificationProducer extends PersistableBusinessObjectBase{
 34  
     @Id
 35  
     @GeneratedValue(generator="KREN_PRODCR_S")
 36  
         @GenericGenerator(name="KREN_PRODCR_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
 37  
                         @Parameter(name="sequence_name",value="KREN_PRODCR_S"),
 38  
                         @Parameter(name="value_column",value="id")
 39  
         })
 40  
         @Column(name="PRODCR_ID")
 41  
         private Long id;
 42  
     @Column(name="NM", nullable=false)
 43  
         private String name;
 44  
     @Column(name="DESC_TXT", nullable=false)
 45  
         private String description;
 46  
     @Column(name="CNTCT_INFO", nullable=false)
 47  
         private String contactInfo;
 48  
     
 49  
     // List references
 50  
     @ManyToMany(fetch=FetchType.EAGER, cascade={CascadeType.ALL})@JoinTable(name="KREN_CHNL_PRODCR_T", 
 51  
                    joinColumns=@JoinColumn(name="PRODCR_ID"), 
 52  
                    inverseJoinColumns=@JoinColumn(name="CHNL_ID"))
 53  
         @OrderBy("id ASC")
 54  
         private List<NotificationChannel> channels;
 55  
     
 56  
     /**
 57  
      * Constructs a NotificationProducer instance.
 58  
      */
 59  0
     public NotificationProducer() {
 60  0
         channels = new ArrayList<NotificationChannel>();
 61  0
     }
 62  
 
 63  
     /**
 64  
      * Gets the contactInfo attribute. 
 65  
      * @return Returns the contactInfo.
 66  
      */
 67  
     public String getContactInfo() {
 68  0
         return contactInfo;
 69  
     }
 70  
 
 71  
     /**
 72  
      * Sets the contactInfo attribute value.
 73  
      * @param contactInfo The contactInfo to set.
 74  
      */
 75  
     public void setContactInfo(String contactInfo) {
 76  0
         this.contactInfo = contactInfo;
 77  0
     }
 78  
 
 79  
     /**
 80  
      * Gets the description attribute. 
 81  
      * @return Returns the description.
 82  
      */
 83  
     public String getDescription() {
 84  0
         return description;
 85  
     }
 86  
 
 87  
     /**
 88  
      * Sets the description attribute value.
 89  
      * @param description The description to set.
 90  
      */
 91  
     public void setDescription(String description) {
 92  0
         this.description = description;
 93  0
     }
 94  
 
 95  
     /**
 96  
      * Gets the id attribute. 
 97  
      * @return Returns the id.
 98  
      */
 99  
     public Long getId() {
 100  0
         return id;
 101  
     }
 102  
 
 103  
     /**
 104  
      * Sets the id attribute value.
 105  
      * @param id The id to set.
 106  
      */
 107  
     public void setId(Long id) {
 108  0
         this.id = id;
 109  0
     }
 110  
 
 111  
     /**
 112  
      * Gets the name attribute. 
 113  
      * @return Returns the name.
 114  
      */
 115  
     public String getName() {
 116  0
         return name;
 117  
     }
 118  
 
 119  
     /**
 120  
      * Sets the name attribute value.
 121  
      * @param name The name to set.
 122  
      */
 123  
     public void setName(String name) {
 124  0
         this.name = name;
 125  0
     }
 126  
 
 127  
     /**
 128  
      * Gets the channels attribute. 
 129  
      * @return Returns the channels.
 130  
      */
 131  
     public List<NotificationChannel> getChannels() {
 132  0
         return channels;
 133  
     }
 134  
 
 135  
     /**
 136  
      * Sets the channels attribute value.
 137  
      * @param channels The channels to set.
 138  
      */
 139  
     public void setChannels(List<NotificationChannel> channels) {
 140  0
         this.channels = channels;
 141  0
     }
 142  
 }