Coverage Report - org.kuali.rice.ken.bo.NotificationChannelReviewer
 
Classes in this File Line Coverage Branch Coverage Complexity
NotificationChannelReviewer
0%
0/14
0%
0/2
1.111
 
 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 javax.persistence.JoinColumn;
 19  
 import javax.persistence.FetchType;
 20  
 import javax.persistence.OneToOne;
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Id;
 23  
 import javax.persistence.CascadeType;
 24  
 import javax.persistence.Table;
 25  
 import javax.persistence.Entity;
 26  
 
 27  
 import org.apache.commons.lang.builder.ToStringBuilder;
 28  
 
 29  
 /**
 30  
  * A reviewer for a notification publications to a NotificationChannel
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  
 @Entity
 34  
 @Table(name="KREN_RVWER_T")
 35  0
 public class NotificationChannelReviewer {
 36  
     @Id
 37  
         @Column(name="RVWER_ID")
 38  
         private Long id;
 39  
     @OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST})
 40  
         @JoinColumn(name="CHNL_ID")
 41  
         private NotificationChannel channel;
 42  
     @Column(name="TYP", nullable=false)
 43  
         private String reviewerType;
 44  
     @Column(name="PRNCPL_ID", nullable=false)
 45  
         private String reviewerId;
 46  
 
 47  
     /**
 48  
      * Returns the primary key value
 49  
      * @return the primary key value
 50  
      */
 51  
     public Long getId() {
 52  0
         return id;
 53  
     }
 54  
 
 55  
     /**
 56  
      * Sets the primary key value
 57  
      * @param id the primary key value
 58  
      */
 59  
     public void setId(Long id) {
 60  0
         this.id = id;
 61  0
     }
 62  
     
 63  
     /**
 64  
      * Returns the channel with which this reviewer is associated
 65  
      * @return the channel with which this reviewer is associated
 66  
      */
 67  
     public NotificationChannel getChannel() {
 68  0
         return channel;
 69  
     }
 70  
 
 71  
     /**
 72  
      * Sets the channel with which this reviewer is associated
 73  
      * @param channel the channel with which this reviewer is associated
 74  
      */
 75  
     public void setChannel(NotificationChannel channel) {
 76  0
         this.channel = channel;
 77  0
     }
 78  
 
 79  
     /**
 80  
      * Returns the user id of the reviewer.  This is abstract but ultimately
 81  
      * will need to be resolved to a KEW user/group
 82  
      * @return the user id of the reviewer
 83  
      */
 84  
     public String getReviewerId() {
 85  0
         return reviewerId;
 86  
     }
 87  
     
 88  
     /**
 89  
      * Sets the user id of the reviewer
 90  
      * @param reviewerId the user id of the reviewer
 91  
      */
 92  
     public void setReviewerId(String reviewerId) {
 93  0
         this.reviewerId = reviewerId;
 94  0
     }
 95  
     
 96  
     /**
 97  
      * Returns the type of reviewer, USER or GROUP
 98  
      * @return the type of reviewer, USER or GROUP
 99  
      */
 100  
     public String getReviewerType() {
 101  0
         return reviewerType;
 102  
     }
 103  
 
 104  
     /**
 105  
      * Sets the type of reviewer, USER or GROUP
 106  
      * @param reviewerType the type of reviewer, USER or GROUP
 107  
      */
 108  
     public void setReviewerType(String reviewerType) {
 109  0
         this.reviewerType = reviewerType;
 110  0
     }
 111  
 
 112  
     /**
 113  
      * @see java.lang.Object#toString()
 114  
      */
 115  
     public String toString() {
 116  0
         return new ToStringBuilder(this).append("id", id)
 117  
                                         .append("channel", channel != null ? channel.getId() : null)
 118  
                                         .append("reviewerId", reviewerId).toString();
 119  
     }
 120  
 }