Clover Coverage Report - Kuali Student 1.1.0-SNAPSHOT (Aggregated)
Coverage timestamp: Tue Feb 15 2011 04:04:07 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
16   141   16   1
0   97   1   16
16     1  
1    
 
  DateRange       Line # 46 16 0% 16 0 100% 1.0
 
  (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.AttributeOverride;
22    import javax.persistence.AttributeOverrides;
23    import javax.persistence.CascadeType;
24    import javax.persistence.Column;
25    import javax.persistence.Entity;
26    import javax.persistence.JoinColumn;
27    import javax.persistence.ManyToOne;
28    import javax.persistence.NamedQueries;
29    import javax.persistence.NamedQuery;
30    import javax.persistence.OneToMany;
31    import javax.persistence.Table;
32    import javax.persistence.Temporal;
33    import javax.persistence.TemporalType;
34   
35    import org.kuali.student.core.entity.AttributeOwner;
36    import org.kuali.student.core.entity.MetaEntity;
37   
38    @Entity
39    @Table(name = "KSAP_DT_RANGE")
40    @NamedQueries({
41    @NamedQuery(name="DateRange.findDateRangesByAtp", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.atp.id = :atpId"),
42    @NamedQuery(name="DateRange.findDateRangesByDate", query="SELECT dateRange FROM DateRange dateRange WHERE dateRange.startDate <= :searchDate AND dateRange.endDate >= :searchDate")
43    })
44    @AttributeOverrides({
45    @AttributeOverride(name="id", column=@Column(name="DATERANGE_KEY"))})
 
46    public class DateRange extends MetaEntity implements AttributeOwner<DateRangeAttribute> {
47   
48    @Column(name = "NAME")
49    private String name;
50   
51    @ManyToOne(cascade=CascadeType.ALL)
52    @JoinColumn(name = "RT_DESCR_ID")
53    private AtpRichText descr;
54   
55    @ManyToOne
56    @JoinColumn(name = "ATP_ID")
57    private Atp atp;
58   
59    @Temporal(TemporalType.TIMESTAMP)
60    @Column(name="START_DT")
61    private Date startDate;
62   
63    @Temporal(TemporalType.TIMESTAMP)
64    @Column(name="END_DT")
65    private Date endDate;
66   
67    @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
68    private List<DateRangeAttribute> attributes;
69   
70    @ManyToOne
71    @JoinColumn(name = "DT_RANGE_TYPE_ID")
72    private DateRangeType type;
73   
74    @Column(name="STATE")
75    private String state;
76   
 
77  4 toggle public String getName() {
78  4 return name;
79    }
80   
 
81  3 toggle public void setName(String name) {
82  3 this.name = name;
83    }
84   
 
85  4 toggle public AtpRichText getDescr() {
86  4 return descr;
87    }
88   
 
89  3 toggle public void setDescr(AtpRichText descr) {
90  3 this.descr = descr;
91    }
92   
 
93  4 toggle public Atp getAtp() {
94  4 return atp;
95    }
96   
 
97  3 toggle public void setAtp(Atp atp) {
98  3 this.atp = atp;
99    }
100   
 
101  4 toggle public Date getStartDate() {
102  4 return startDate;
103    }
104   
 
105  3 toggle public void setStartDate(Date startDate) {
106  3 this.startDate = startDate;
107    }
108   
 
109  4 toggle public Date getEndDate() {
110  4 return endDate;
111    }
112   
 
113  3 toggle public void setEndDate(Date endDate) {
114  3 this.endDate = endDate;
115    }
116   
 
117  10 toggle public List<DateRangeAttribute> getAttributes() {
118  10 return attributes;
119    }
120   
 
121  4 toggle public void setAttributes(List<DateRangeAttribute> attributes) {
122  4 this.attributes = attributes;
123    }
124   
 
125  4 toggle public DateRangeType getType() {
126  4 return type;
127    }
128   
 
129  3 toggle public void setType(DateRangeType type) {
130  3 this.type = type;
131    }
132   
 
133  4 toggle public String getState() {
134  4 return state;
135    }
136   
 
137  2 toggle public void setState(String state) {
138  2 this.state = state;
139    }
140   
141    }