1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.core.comment.entity; |
17 |
|
|
18 |
|
import java.util.List; |
19 |
|
|
20 |
|
import javax.persistence.CascadeType; |
21 |
|
import javax.persistence.Column; |
22 |
|
import javax.persistence.Entity; |
23 |
|
import javax.persistence.JoinColumn; |
24 |
|
import javax.persistence.ManyToOne; |
25 |
|
import javax.persistence.NamedQueries; |
26 |
|
import javax.persistence.NamedQuery; |
27 |
|
import javax.persistence.OneToMany; |
28 |
|
import javax.persistence.Table; |
29 |
|
import javax.persistence.UniqueConstraint; |
30 |
|
|
31 |
|
import org.kuali.student.common.entity.BaseEntity; |
32 |
|
|
33 |
|
@Entity |
34 |
|
@Table(name = "KSCO_REFERENCE", |
35 |
|
uniqueConstraints= @UniqueConstraint(columnNames={"REFERENCE_ID", "REFERENCE_TYPE"})) |
36 |
|
@NamedQueries( { |
37 |
|
@NamedQuery(name = "Reference.getReference", query = "SELECT reference FROM Reference reference WHERE reference.referenceId =:refId AND reference.referenceType.id=:refTypeId")}) |
|
|
| 50% |
Uncovered Elements: 8 (16) |
Complexity: 8 |
Complexity Density: 1 |
|
38 |
|
public class Reference extends BaseEntity { |
39 |
|
@Column(name="REFERENCE_ID") |
40 |
|
private String referenceId; |
41 |
|
|
42 |
|
@ManyToOne |
43 |
|
@JoinColumn(name = "REFERENCE_TYPE") |
44 |
|
private ReferenceType referenceType; |
45 |
|
|
46 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy="reference") |
47 |
|
private List<Tag> tags; |
48 |
|
|
49 |
|
@OneToMany(cascade = CascadeType.ALL, mappedBy="reference") |
50 |
|
private List<Comment> comments; |
51 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
11
|
public String getReferenceId(){... |
53 |
11
|
return referenceId; |
54 |
|
} |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
5
|
public void setReferenceId(String referenceId){... |
57 |
5
|
this.referenceId=referenceId; |
58 |
|
} |
59 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
11
|
public ReferenceType getReferenceType(){... |
61 |
11
|
return referenceType; |
62 |
|
} |
63 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
5
|
public void setReferenceType(ReferenceType referenceType){... |
65 |
5
|
this.referenceType=referenceType; |
66 |
|
} |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
0
|
public List<Tag> getTags(){... |
69 |
0
|
return tags; |
70 |
|
} |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
72 |
0
|
public void setTags(List<Tag> tags){... |
73 |
0
|
this.tags=tags; |
74 |
|
} |
75 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
0
|
public List<Comment> getCommentss(){... |
77 |
0
|
return comments; |
78 |
|
} |
79 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
0
|
public void setComments(List<Comment> comments){... |
81 |
0
|
this.comments=comments; |
82 |
|
} |
83 |
|
} |