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