1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.lum.lu.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.JoinTable; |
26 | |
import javax.persistence.ManyToOne; |
27 | |
import javax.persistence.NamedQueries; |
28 | |
import javax.persistence.NamedQuery; |
29 | |
import javax.persistence.OneToMany; |
30 | |
import javax.persistence.Table; |
31 | |
import javax.persistence.Temporal; |
32 | |
import javax.persistence.TemporalType; |
33 | |
|
34 | |
import org.kuali.student.common.entity.MetaEntity; |
35 | |
|
36 | |
@Entity |
37 | |
@Table(name = "KSLU_CLU_RSLT") |
38 | |
@NamedQueries( { |
39 | |
@NamedQuery(name = "CluResult.getCluResultByCluId", query = "SELECT cr FROM CluResult cr WHERE cr.clu.id = :cluId"), |
40 | |
@NamedQuery(name = "CluResult.getCluIdByResultUsageType", query = "SELECT cr.clu.id FROM CluResult cr INNER JOIN cr.resultOptions res WHERE res.resultUsageType = :resultUsageType"), |
41 | |
@NamedQuery(name = "CluResult.getCluIdByResultComponentId", query = "SELECT cr.clu.id FROM CluResult cr INNER JOIN cr.resultOptions res WHERE res.resultComponentId = :resultComponentId") |
42 | |
}) |
43 | 219 | public class CluResult extends MetaEntity { |
44 | |
|
45 | |
@ManyToOne(cascade=CascadeType.ALL) |
46 | |
@JoinColumn(name = "RT_DESCR_ID") |
47 | |
private LuRichText desc; |
48 | |
|
49 | |
@Temporal(TemporalType.TIMESTAMP) |
50 | |
@Column(name = "EFF_DT") |
51 | |
private Date effectiveDate; |
52 | |
|
53 | |
@Temporal(TemporalType.TIMESTAMP) |
54 | |
@Column(name = "EXPIR_DT") |
55 | |
private Date expirationDate; |
56 | |
|
57 | |
@ManyToOne |
58 | |
@JoinColumn(name = "CLU_ID") |
59 | |
private Clu clu; |
60 | |
|
61 | |
@OneToMany(cascade=CascadeType.ALL) |
62 | |
@JoinTable(name = "KSLU_CLURES_JN_RESOPT", joinColumns = @JoinColumn(name = "CLU_RES_ID"), inverseJoinColumns = @JoinColumn(name = "RES_OPT_ID")) |
63 | |
private List<ResultOption> resultOptions; |
64 | |
|
65 | |
@ManyToOne |
66 | |
@JoinColumn(name="TYPE_KEY_ID") |
67 | |
private CluResultType cluResultType; |
68 | |
|
69 | |
@Column(name = "ST") |
70 | |
private String state; |
71 | |
|
72 | |
public LuRichText getDesc() { |
73 | 241 | return desc; |
74 | |
} |
75 | |
|
76 | |
public void setDesc(LuRichText desc) { |
77 | 110 | this.desc = desc; |
78 | 110 | } |
79 | |
|
80 | |
public Date getEffectiveDate() { |
81 | 241 | return effectiveDate; |
82 | |
} |
83 | |
|
84 | |
public void setEffectiveDate(Date effectiveDate) { |
85 | 110 | this.effectiveDate = effectiveDate; |
86 | 110 | } |
87 | |
|
88 | |
public Date getExpirationDate() { |
89 | 241 | return expirationDate; |
90 | |
} |
91 | |
|
92 | |
public void setExpirationDate(Date expirationDate) { |
93 | 110 | this.expirationDate = expirationDate; |
94 | 110 | } |
95 | |
|
96 | |
public Clu getClu() { |
97 | 241 | return clu; |
98 | |
} |
99 | |
|
100 | |
public void setClu(Clu clu) { |
101 | 89 | this.clu = clu; |
102 | 89 | } |
103 | |
|
104 | |
public List<ResultOption> getResultOptions() { |
105 | 310 | return resultOptions; |
106 | |
} |
107 | |
|
108 | |
public void setResultOptions(List<ResultOption> resultOptions) { |
109 | 89 | this.resultOptions = resultOptions; |
110 | 89 | } |
111 | |
|
112 | |
public CluResultType getCluResultType() { |
113 | 241 | return cluResultType; |
114 | |
} |
115 | |
|
116 | |
public void setCluResultType(CluResultType type) { |
117 | 110 | this.cluResultType = type; |
118 | 110 | } |
119 | |
|
120 | |
public String getState() { |
121 | 241 | return state; |
122 | |
} |
123 | |
|
124 | |
public void setState(String state) { |
125 | 110 | this.state = state; |
126 | 110 | } |
127 | |
|
128 | |
} |