Coverage Report - org.kuali.student.core.comment.entity.Reference
 
Classes in this File Line Coverage Branch Coverage Complexity
Reference
53%
7/13
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.core.comment.entity;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import javax.persistence.CascadeType;
 21  
 import javax.persistence.Column;
 22  
 import javax.persistence.Entity;
 23  
 import javax.persistence.JoinColumn;
 24  
 import javax.persistence.ManyToOne;
 25  
 import javax.persistence.NamedQueries;
 26  
 import javax.persistence.NamedQuery;
 27  
 import javax.persistence.OneToMany;
 28  
 import javax.persistence.Table;
 29  
 import javax.persistence.UniqueConstraint;
 30  
 
 31  
 import org.kuali.student.core.entity.BaseEntity;
 32  
 
 33  
 @Entity
 34  
 @Table(name = "KSCO_REFERENCE",
 35  
         uniqueConstraints= @UniqueConstraint(columnNames={"REFERENCE_ID", "REFERENCE_TYPE"}))
 36  
 @NamedQueries( {
 37  
         @NamedQuery(name = "Reference.getReference", query = "SELECT reference FROM Reference reference WHERE reference.referenceId =:refId AND reference.referenceType.id=:refTypeId")})
 38  24
 public class Reference extends BaseEntity {
 39  
     @Column(name="REFERENCE_ID")
 40  
     private String referenceId;
 41  
 
 42  
     @ManyToOne
 43  
     @JoinColumn(name = "REFERENCE_TYPE")
 44  
     private ReferenceType referenceType;
 45  
 
 46  
     @OneToMany(cascade = CascadeType.ALL, mappedBy="reference")
 47  
     private List<Tag> tags;
 48  
 
 49  
     @OneToMany(cascade = CascadeType.ALL, mappedBy="reference")
 50  
     private List<Comment> comments;
 51  
 
 52  
     public String getReferenceId(){
 53  11
         return referenceId;
 54  
     }
 55  
 
 56  
     public void setReferenceId(String referenceId){
 57  5
         this.referenceId=referenceId;
 58  5
     }
 59  
 
 60  
     public ReferenceType getReferenceType(){
 61  11
         return referenceType;
 62  
     }
 63  
 
 64  
     public void setReferenceType(ReferenceType referenceType){
 65  5
         this.referenceType=referenceType;
 66  5
     }
 67  
 
 68  
     public List<Tag> getTags(){
 69  0
         return tags;
 70  
     }
 71  
 
 72  
     public void setTags(List<Tag> tags){
 73  0
         this.tags=tags;
 74  0
     }
 75  
 
 76  
     public List<Comment> getCommentss(){
 77  0
         return comments;
 78  
     }
 79  
 
 80  
     public void setComments(List<Comment> comments){
 81  0
         this.comments=comments;
 82  0
     }
 83  
 }