Clover Coverage Report - Kuali Student 1.2-M2-SNAPSHOT (Aggregated)
Coverage timestamp: Fri Apr 22 2011 04:03:20 EST
../../../../../../img/srcFileCovDistChart9.png 32% of files have more coverage
18   148   18   1
0   101   1   18
18     1  
1    
 
  Atp       Line # 42 18 0% 18 4 88.9% 0.8888889
 
  (2)
 
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    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  6 toggle public String getName() {
77  6 return name;
78    }
79   
 
80  4 toggle public void setName(String name) {
81  4 this.name = name;
82    }
83   
 
84  6 toggle public AtpRichText getDescr() {
85  6 return descr;
86    }
87   
 
88  4 toggle public void setDescr(AtpRichText descr) {
89  4 this.descr = descr;
90    }
91   
 
92  6 toggle public Date getStartDate() {
93  6 return startDate;
94    }
95   
 
96  4 toggle public void setStartDate(Date startDate) {
97  4 this.startDate = startDate;
98    }
99   
 
100  6 toggle public Date getEndDate() {
101  6 return endDate;
102    }
103   
 
104  4 toggle public void setEndDate(Date endDate) {
105  4 this.endDate = endDate;
106    }
107   
 
108  12 toggle public List<AtpAttribute> getAttributes() {
109  12 return attributes;
110    }
111   
 
112  5 toggle public void setAttributes(List<AtpAttribute> attributes) {
113  5 this.attributes = attributes;
114    }
115   
 
116  6 toggle public AtpType getType() {
117  6 return type;
118    }
119   
 
120  4 toggle public void setType(AtpType type) {
121  4 this.type = type;
122    }
123   
 
124  6 toggle public String getState() {
125  6 return state;
126    }
127   
 
128  4 toggle public void setState(String state) {
129  4 this.state = state;
130    }
131   
 
132  0 toggle public List<DateRange> getDateRanges() {
133  0 return dateRanges;
134    }
135   
 
136  1 toggle public void setDateRanges(List<DateRange> dateRanges) {
137  1 this.dateRanges = dateRanges;
138    }
139   
 
140  0 toggle public List<Milestone> getMilestones() {
141  0 return milestones;
142    }
143   
 
144  1 toggle public void setMilestones(List<Milestone> milestones) {
145  1 this.milestones = milestones;
146    }
147   
148    }