Coverage Report - org.kuali.student.core.atp.bo.DateRange
 
Classes in this File Line Coverage Branch Coverage Complexity
DateRange
0%
0/23
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.atp.bo;
 17  
 
 18  
 import java.util.Date;
 19  
 
 20  
 import javax.persistence.Column;
 21  
 import javax.persistence.Entity;
 22  
 import javax.persistence.JoinColumn;
 23  
 import javax.persistence.ManyToOne;
 24  
 import javax.persistence.NamedQueries;
 25  
 import javax.persistence.NamedQuery;
 26  
 import javax.persistence.Table;
 27  
 import javax.persistence.Temporal;
 28  
 import javax.persistence.TemporalType;
 29  
 
 30  
 import org.kuali.student.core.bo.KsTypeStateBusinessObjectBase;
 31  
 
 32  
 @Entity
 33  
 @Table(name = "KSAP_DT_RANGE")
 34  
 @NamedQueries({
 35  
         @NamedQuery(name="DateRange.findDateRangesByAtp", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.atp.id = :atpId"),
 36  
         @NamedQuery(name="DateRange.findDateRangesByDate", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.startDate <= :searchDate AND dateRange.endDate >= :searchDate")
 37  
 })
 38  
 public class DateRange extends KsTypeStateBusinessObjectBase {
 39  
         private static final long serialVersionUID = -9071561165465644092L;
 40  
 
 41  
         @Column(name = "ATP_ID")
 42  
         private String atpId;
 43  
         
 44  
         @ManyToOne
 45  
         @JoinColumn(name = "ATP_ID")
 46  
         private Atp atp;
 47  
         
 48  
         @ManyToOne
 49  
         @JoinColumn(name = "TYPE")
 50  
         private DateRangeType type;
 51  
         
 52  
         @Temporal(TemporalType.TIMESTAMP)
 53  
         @Column(name="START_DT")
 54  
         private Date startDate;
 55  
         
 56  
         @Temporal(TemporalType.TIMESTAMP)
 57  
         @Column(name="END_DT")
 58  
         private Date endDate;
 59  
         
 60  
         private String descriptionId;
 61  
     
 62  
     private AtpRichText description;
 63  
         
 64  
         public DateRange() {
 65  0
                 super();
 66  0
         }
 67  
         
 68  
         public Atp getAtp() {
 69  0
                 return atp;
 70  
         }
 71  
 
 72  
         public Date getStartDate() {
 73  0
                 return startDate;
 74  
         }
 75  
 
 76  
         public void setStartDate(Date startDate) {
 77  0
                 this.startDate = startDate;
 78  0
         }
 79  
 
 80  
         public Date getEndDate() {
 81  0
                 return endDate;
 82  
         }
 83  
 
 84  
         public void setEndDate(Date endDate) {
 85  0
                 this.endDate = endDate;
 86  0
         }
 87  
 
 88  
         public String getAtpId() {
 89  0
                 return atpId;
 90  
         }
 91  
 
 92  
         public void setAtpId(String atpId) {
 93  0
                 this.atpId = atpId;
 94  0
         }
 95  
 
 96  
         public void setAtp(Atp atp) {
 97  0
                 this.atp = atp;
 98  0
         }
 99  
 
 100  
         public DateRangeType getType() {
 101  0
                 return type;
 102  
         }
 103  
 
 104  
         public void setType(DateRangeType type) {
 105  0
                 this.type = type;
 106  0
         }
 107  
 
 108  
     public String getDescriptionId() {
 109  0
         return descriptionId;
 110  
     }
 111  
 
 112  
     public void setDescriptionId(String descriptionId) {
 113  0
         this.descriptionId = descriptionId;
 114  0
     }
 115  
 
 116  
     public AtpRichText getDescription() {
 117  0
         return description;
 118  
     }
 119  
 
 120  
     public void setDescription(AtpRichText description) {
 121  0
         this.description = description;
 122  0
     }
 123  
         
 124  
 }