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