Clover Coverage Report - Kuali Student 1.2-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Mar 3 2011 04:02:59 EST
../../../../../../img/srcFileCovDistChart0.png 51% of files have more coverage
20   210   20   1
0   120   1   20
20     1  
1    
 
  Document       Line # 49 20 0% 20 40 0% 0.0
 
No Tests
 
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.document.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.FetchType;
27    import javax.persistence.JoinColumn;
28    import javax.persistence.JoinTable;
29    import javax.persistence.Lob;
30    import javax.persistence.ManyToMany;
31    import javax.persistence.ManyToOne;
32    import javax.persistence.OneToMany;
33    import javax.persistence.Table;
34    import javax.persistence.Temporal;
35    import javax.persistence.TemporalType;
36   
37    import org.kuali.student.common.entity.AttributeOwner;
38    import org.kuali.student.common.entity.MetaEntity;
39    /**
40    * This is a description of what this class does - lindholm don't forget to fill this in.
41    *
42    * @author Kuali Rice Team (kuali-rice@googlegroups.com)
43    *
44    */
45    @Entity
46    @Table(name = "KSDO_DOCUMENT")
47    @AttributeOverrides({
48    @AttributeOverride(name="id", column=@Column(name="DOC_ID"))})
 
49    public class Document extends MetaEntity implements AttributeOwner<DocumentAttribute> {
50    private static final long serialVersionUID = 1L;
51   
52    @Column(name = "NAME")
53    private String name;
54   
55    @Column(name = "FILE_NAME")
56    private String fileName;
57   
58    @ManyToOne(cascade = CascadeType.ALL)
59    @JoinColumn(name = "RT_DESCR_ID")
60    private DocumentRichText descr;
61   
62    @Lob
63    @Column(name = "DOCUMENT", length=10000000)
64    private String document;
65   
66    @Temporal(TemporalType.TIMESTAMP)
67    @Column(name = "EFF_DT")
68    private Date effectiveDate;
69   
70    @Temporal(TemporalType.TIMESTAMP)
71    @Column(name = "EXPIR_DT")
72    private Date expirationDate;
73   
74    @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
75    private List<DocumentAttribute> attributes;
76   
77    @ManyToOne(optional=true)
78    @JoinColumn(name = "TYPE")
79    private DocumentType type;
80   
81   
82    @Column(name = "STATE")
83    private String state;
84   
85   
86    @ManyToMany(fetch=FetchType.EAGER)
87    @JoinTable(name="KSDO_DOCUMENT_JN_DOC_CATEGORY",
88    joinColumns=
89    @JoinColumn(name="DOC_ID", referencedColumnName="DOC_ID"),
90    inverseJoinColumns=
91    @JoinColumn(name="CATEGORY_ID", referencedColumnName="CATEGORY_ID")
92    )
93    private List<DocumentCategory> categoryList;
94   
 
95  0 toggle public String getName(){
96  0 return name;
97    }
98   
 
99  0 toggle public void setName(String name){
100  0 this.name=name;
101    }
102   
 
103  0 toggle public String getFileName(){
104  0 return fileName;
105    }
106   
 
107  0 toggle public void setFileName(String fileName){
108  0 this.fileName=fileName;
109    }
110   
111    /**
112    * @return the commentText
113    */
 
114  0 toggle public DocumentRichText getDescr() {
115  0 return descr;
116    }
117   
118    /**
119    * @param commentText the commentText to set
120    */
 
121  0 toggle public void setDescr(DocumentRichText descr) {
122  0 this.descr = descr;
123    }
124   
125   
 
126  0 toggle public String getDocument(){
127  0 return document;
128    }
129   
 
130  0 toggle public void setDocument(String document){
131  0 this.document=document;
132    }
133   
134    /**
135    * @return the effectiveDate
136    */
 
137  0 toggle public Date getEffectiveDate() {
138  0 return effectiveDate;
139    }
140   
141    /**
142    * @param effectiveDate the effectiveDate to set
143    */
 
144  0 toggle public void setEffectiveDate(Date effectiveDate) {
145  0 this.effectiveDate = effectiveDate;
146    }
147   
148    /**
149    * @return the expirationDate
150    */
 
151  0 toggle public Date getExpirationDate() {
152  0 return expirationDate;
153    }
154   
155    /**
156    * @param expirationDate the expirationDate to set
157    */
 
158  0 toggle public void setExpirationDate(Date expirationDate) {
159  0 this.expirationDate = expirationDate;
160    }
161   
162   
 
163  0 toggle @Override
164    public List<DocumentAttribute> getAttributes() {
165  0 return attributes;
166    }
167   
 
168  0 toggle @Override
169    public void setAttributes(List<DocumentAttribute> attributes) {
170  0 this.attributes = attributes;
171    }
172   
173    /**
174    * @return the type
175    */
 
176  0 toggle public DocumentType getType() {
177  0 return type;
178    }
179   
180    /**
181    * @param type the type to set
182    */
 
183  0 toggle public void setType(DocumentType type) {
184  0 this.type = type;
185    }
186   
187    /**
188    * @return the state
189    */
 
190  0 toggle public String getState() {
191  0 return state;
192    }
193   
194    /**
195    * @param state the state to set
196    */
 
197  0 toggle public void setState(String state) {
198  0 this.state = state;
199    }
200   
201   
 
202  0 toggle public List<DocumentCategory> getCategoryList(){
203  0 return categoryList;
204    }
205   
 
206  0 toggle public void setCategoryList(List<DocumentCategory> categoryList){
207  0 this.categoryList = categoryList;
208    }
209   
210    }