1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kew.useroptions; |
18 | |
|
19 | |
import javax.persistence.Column; |
20 | |
import javax.persistence.Entity; |
21 | |
import javax.persistence.Id; |
22 | |
import javax.persistence.IdClass; |
23 | |
import javax.persistence.NamedQueries; |
24 | |
import javax.persistence.NamedQuery; |
25 | |
import javax.persistence.Table; |
26 | |
import javax.persistence.Version; |
27 | |
|
28 | |
import org.kuali.rice.kew.preferences.Preferences; |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@IdClass(org.kuali.rice.kew.useroptions.UserOptionsId.class) |
37 | |
@Entity |
38 | |
@Table(name="KREW_USR_OPTN_T") |
39 | |
@NamedQueries({ |
40 | |
@NamedQuery(name="UserOptions.FindByUserQualified", query="select uo from UserOptions uo where uo.workflowId = :workflowId and uo.optionId like :optionId"), |
41 | |
@NamedQuery(name="UserOptions.FindByWorkflowId", query="select uo from UserOptions uo where uo.workflowId = :workflowId"), |
42 | |
@NamedQuery(name="UserOptions.FindByOptionValue", query="select uo from UserOptions uo where uo.optionId = :optionId and uo.optionVal = :optionValue"), |
43 | |
@NamedQuery(name="UserOptions.FindByOptionId", query="select uo from UserOptions uo where uo.optionId = :optionId and uo.workflowId = :workflowId") |
44 | |
}) |
45 | 0 | public class UserOptions implements Comparable { |
46 | |
|
47 | |
@Id |
48 | |
@Column(name="PRNCPL_ID",insertable=false,updatable=false) |
49 | |
private String workflowId; |
50 | |
@Id |
51 | |
@Column(name="PRSN_OPTN_ID",insertable=false,updatable=false) |
52 | |
private String optionId; |
53 | |
@Column(name="VAL") |
54 | |
private String optionVal; |
55 | |
@Version |
56 | |
@Column(name="VER_NBR") |
57 | |
private Integer lockVerNbr; |
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
public Integer getLockVerNbr() { |
63 | 0 | return lockVerNbr; |
64 | |
} |
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
public String getOptionId() { |
70 | 0 | return optionId; |
71 | |
} |
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | |
public String getOptionVal() { |
77 | 0 | return optionVal; |
78 | |
} |
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
public String getWorkflowId() { |
84 | 0 | return workflowId; |
85 | |
} |
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
public void setLockVerNbr(Integer integer) { |
91 | 0 | lockVerNbr = integer; |
92 | 0 | } |
93 | |
|
94 | |
|
95 | |
|
96 | |
|
97 | |
public void setOptionId(String string) { |
98 | 0 | optionId = string; |
99 | 0 | } |
100 | |
|
101 | |
|
102 | |
|
103 | |
|
104 | |
public void setOptionVal(String string) { |
105 | 0 | optionVal = string; |
106 | 0 | } |
107 | |
|
108 | |
|
109 | |
|
110 | |
|
111 | |
public void setWorkflowId(String string) { |
112 | 0 | workflowId = string; |
113 | 0 | } |
114 | |
|
115 | |
|
116 | |
public int compareTo(Object o) { |
117 | 0 | if (o instanceof UserOptions) { |
118 | 0 | return this.getOptionId().compareTo(((UserOptions)o).getOptionId()); |
119 | |
} |
120 | 0 | return 0; |
121 | |
} |
122 | |
} |
123 | |
|