Coverage Report - org.kuali.student.core.atp.entity.Atp
 
Classes in this File Line Coverage Branch Coverage Complexity
Atp
0%
0/28
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.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.NamedQueries;
 27  
 import javax.persistence.NamedQuery;
 28  
 import javax.persistence.OneToMany;
 29  
 import javax.persistence.Table;
 30  
 import javax.persistence.Temporal;
 31  
 import javax.persistence.TemporalType;
 32  
 
 33  
 import org.kuali.student.common.entity.AttributeOwner;
 34  
 import org.kuali.student.common.entity.MetaEntity;
 35  
 @Entity
 36  
 @Table(name = "KSAP_ATP")
 37  
 @NamedQueries( { 
 38  
         @NamedQuery(name = "Atp.findAtpsByAtpType", query = "SELECT atp FROM Atp atp WHERE atp.type.id = :atpTypeId"),
 39  
         @NamedQuery(name = "Atp.findAtpsByDate", query = "SELECT atp FROM Atp atp WHERE atp.startDate <= :searchDate AND atp.endDate > :searchDate"),
 40  
         @NamedQuery(name = "Atp.findAtpsByDates", query = "SELECT atp FROM Atp atp WHERE atp.startDate >= :startDate AND atp.endDate <= :endDate")
 41  
 })
 42  0
 public class Atp extends MetaEntity implements AttributeOwner<AtpAttribute> {
 43  
 
 44  
 
 45  
         @Column(name = "NAME")
 46  
         private String name;
 47  
 
 48  
         @ManyToOne(cascade = CascadeType.ALL)
 49  
         @JoinColumn(name = "RT_DESCR_ID")
 50  
         private AtpRichText descr;
 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  
         @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
 61  
         private List<AtpAttribute> attributes;
 62  
 
 63  
         @ManyToOne
 64  
         @JoinColumn(name = "TYPE")
 65  
         private AtpType type;
 66  
 
 67  
         @Column(name = "STATE")
 68  
         private String state;
 69  
 
 70  
         @OneToMany(mappedBy = "atp", cascade = CascadeType.REMOVE)
 71  
         private List<DateRange> dateRanges;
 72  
 
 73  
         @OneToMany(mappedBy = "atp", cascade = CascadeType.REMOVE)
 74  
         private List<Milestone> milestones;
 75  
         
 76  
         public String getName() {
 77  0
                 return name;
 78  
         }
 79  
 
 80  
         public void setName(String name) {
 81  0
                 this.name = name;
 82  0
         }
 83  
 
 84  
         public AtpRichText getDescr() {
 85  0
                 return descr;
 86  
         }
 87  
 
 88  
         public void setDescr(AtpRichText descr) {
 89  0
                 this.descr = descr;
 90  0
         }
 91  
 
 92  
         public Date getStartDate() {
 93  0
                 return startDate;
 94  
         }
 95  
 
 96  
         public void setStartDate(Date startDate) {
 97  0
                 this.startDate = startDate;
 98  0
         }
 99  
 
 100  
         public Date getEndDate() {
 101  0
                 return endDate;
 102  
         }
 103  
 
 104  
         public void setEndDate(Date endDate) {
 105  0
                 this.endDate = endDate;
 106  0
         }
 107  
 
 108  
         public List<AtpAttribute> getAttributes() {
 109  0
                 return attributes;
 110  
         }
 111  
 
 112  
         public void setAttributes(List<AtpAttribute> attributes) {
 113  0
                 this.attributes = attributes;
 114  0
         }
 115  
 
 116  
         public AtpType getType() {
 117  0
                 return type;
 118  
         }
 119  
 
 120  
         public void setType(AtpType type) {
 121  0
                 this.type = type;
 122  0
         }
 123  
 
 124  
         public String getState() {
 125  0
                 return state;
 126  
         }
 127  
 
 128  
         public void setState(String state) {
 129  0
                 this.state = state;
 130  0
         }
 131  
 
 132  
         public List<DateRange> getDateRanges() {
 133  0
                 return dateRanges;
 134  
         }
 135  
 
 136  
         public void setDateRanges(List<DateRange> dateRanges) {
 137  0
                 this.dateRanges = dateRanges;
 138  0
         }
 139  
 
 140  
         public List<Milestone> getMilestones() {
 141  0
                 return milestones;
 142  
         }
 143  
 
 144  
         public void setMilestones(List<Milestone> milestones) {
 145  0
                 this.milestones = milestones;
 146  0
         }
 147  
 
 148  
 }