Coverage Report - org.kuali.student.lum.lo.entity.LoLoRelation
 
Classes in this File Line Coverage Branch Coverage Complexity
LoLoRelation
100%
22/22
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.lum.lo.entity;
 17  
 
 18  
 import java.util.Date;
 19  
 import java.util.List;
 20  
 
 21  
 import javax.persistence.CascadeType;
 22  
 import javax.persistence.Column;
 23  
 import javax.persistence.Entity;
 24  
 import javax.persistence.JoinColumn;
 25  
 import javax.persistence.ManyToOne;
 26  
 import javax.persistence.OneToMany;
 27  
 import javax.persistence.Table;
 28  
 import javax.persistence.Temporal;
 29  
 import javax.persistence.TemporalType;
 30  
 
 31  
 import org.kuali.student.core.entity.AttributeOwner;
 32  
 import org.kuali.student.core.entity.MetaEntity;
 33  
 
 34  
 @Entity
 35  
 @Table(name = "KSLO_LO_RELTN")
 36  581
 public class LoLoRelation extends MetaEntity implements AttributeOwner<LoLoRelationAttribute> {
 37  
         
 38  
         @ManyToOne
 39  
         @JoinColumn(name="LO_ID")
 40  
         private Lo lo;
 41  
         
 42  
         @ManyToOne
 43  
         @JoinColumn(name="RELATED_LO_ID")
 44  
         private Lo relatedLo;
 45  
         
 46  
         @ManyToOne
 47  
         @JoinColumn(name="LO_LO_RELATION_TYPE_ID")
 48  
         private LoLoRelationType loLoRelationType;
 49  
         
 50  
         @Column(name = "ST")
 51  
         private String state;
 52  
         
 53  
         @Temporal(TemporalType.TIMESTAMP)
 54  
         @Column(name = "EFF_DT")
 55  
         private Date effectiveDate;
 56  
 
 57  
         @Temporal(TemporalType.TIMESTAMP)
 58  
         @Column(name = "EXPIR_DT")
 59  
         private Date expirationDate;
 60  
 
 61  
         @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
 62  
         private List<LoLoRelationAttribute> attributes;
 63  
 
 64  
         public void setLo(Lo lo) {
 65  1084
                 this.lo = lo;
 66  1084
         }
 67  
 
 68  
         public Lo getLo() {
 69  611
                 return lo;
 70  
         }
 71  
 
 72  
         public void setRelatedLo(Lo relatedLo) {
 73  1084
                 this.relatedLo = relatedLo;
 74  1084
         }
 75  
 
 76  
         public Lo getRelatedLo() {
 77  611
                 return relatedLo;
 78  
         }
 79  
 
 80  
         /**
 81  
          * @param effectiveDate the effectiveDate to set
 82  
          */
 83  
         public void setEffectiveDate(Date effectiveDate) {
 84  542
                 this.effectiveDate = effectiveDate;
 85  542
         }
 86  
 
 87  
         /**
 88  
          * @return the effectiveDate
 89  
          */
 90  
         public Date getEffectiveDate() {
 91  611
                 return effectiveDate;
 92  
         }
 93  
 
 94  
         /**
 95  
          * @param expirationDate the expirationDate to set
 96  
          */
 97  
         public void setExpirationDate(Date expirationDate) {
 98  542
                 this.expirationDate = expirationDate;
 99  542
         }
 100  
 
 101  
         /**
 102  
          * @return the expirationDate
 103  
          */
 104  
         public Date getExpirationDate() {
 105  611
                 return expirationDate;
 106  
         }
 107  
 
 108  
         @Override
 109  
         public List<LoLoRelationAttribute> getAttributes() {
 110  2237
                 return attributes;
 111  
         }
 112  
 
 113  
         @Override
 114  
         public void setAttributes(List<LoLoRelationAttribute> attributes) {
 115  1084
                 this.attributes = attributes;
 116  1084
         }
 117  
 
 118  
         public void setLoLoRelationType(LoLoRelationType loLoRelationType) {
 119  1084
                 this.loLoRelationType = loLoRelationType;
 120  1084
         }
 121  
 
 122  
         public LoLoRelationType getLoLoRelationType() {
 123  611
                 return loLoRelationType;
 124  
         }
 125  
 
 126  
         public void setState(String state) {
 127  542
                 this.state = state;
 128  542
         }
 129  
 
 130  
         public String getState() {
 131  611
                 return state;
 132  
         }
 133  
 }