| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.kuali.student.common.ui.server.applicationstate.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.Id; |
| 24 |
|
import javax.persistence.JoinTable; |
| 25 |
|
import javax.persistence.NamedQueries; |
| 26 |
|
import javax.persistence.NamedQuery; |
| 27 |
|
import javax.persistence.OneToMany; |
| 28 |
|
import javax.persistence.PrePersist; |
| 29 |
|
import javax.persistence.Table; |
| 30 |
|
import javax.persistence.UniqueConstraint; |
| 31 |
|
|
| 32 |
|
import org.kuali.student.common.util.UUIDHelper; |
| 33 |
|
|
| 34 |
|
@Entity |
| 35 |
|
@Table(name = "KSAP_APP_STATE_T", |
| 36 |
|
uniqueConstraints={@UniqueConstraint(columnNames={"APPLICATION_ID", "REFERENCE_KEY", "REFERENCE_TYPE", "USER_ID"})}) |
| 37 |
|
@NamedQueries( { |
| 38 |
|
@NamedQuery(name = "ApplicationState.getApplicationStateByAppRefUserId", query = "SELECT appState FROM ApplicationState appState WHERE appState.applicationId =:applicationId AND appState.referenceKey =:referenceKey AND appState.referenceType =:referenceType AND appState.userId =:userId") |
| 39 |
|
} ) |
|
|
|
| 92.9% |
Uncovered Elements: 2 (28) |
Complexity: 14 |
Complexity Density: 1 |
|
| 40 |
|
public class ApplicationState { |
| 41 |
|
|
| 42 |
|
@Id |
| 43 |
|
@Column(name = "ID") |
| 44 |
|
private String id; |
| 45 |
|
|
| 46 |
|
@Column(name = "APPLICATION_ID", nullable=false) |
| 47 |
|
private String applicationId; |
| 48 |
|
|
| 49 |
|
@Column(name = "REFERENCE_KEY", nullable=false) |
| 50 |
|
private String referenceKey; |
| 51 |
|
|
| 52 |
|
@Column(name = "REFERENCE_TYPE", nullable=false) |
| 53 |
|
private String referenceType; |
| 54 |
|
|
| 55 |
|
@Column(name = "USER_ID", nullable=false) |
| 56 |
|
private String userId; |
| 57 |
|
|
| 58 |
|
@OneToMany(cascade = CascadeType.ALL) |
| 59 |
|
@JoinTable(name="KS_APP_ST_JN_KEY_VALUE") |
| 60 |
|
private List<KeyValuePair> keyValueList; |
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 65 |
10
|
@PrePersist... |
| 66 |
|
public void prePersist() { |
| 67 |
10
|
this.id = UUIDHelper.genStringUUID(this.id); |
| 68 |
|
} |
| 69 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 70 |
6
|
public String getId() {... |
| 71 |
6
|
return id; |
| 72 |
|
} |
| 73 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 74 |
0
|
public void setId(String id) {... |
| 75 |
0
|
this.id = id; |
| 76 |
|
} |
| 77 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 78 |
12
|
public String getApplicationId() {... |
| 79 |
12
|
return applicationId; |
| 80 |
|
} |
| 81 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 82 |
11
|
public void setApplicationId(String applicationId) {... |
| 83 |
11
|
this.applicationId = applicationId; |
| 84 |
|
} |
| 85 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 86 |
12
|
public String getReferenceKey() {... |
| 87 |
12
|
return referenceKey; |
| 88 |
|
} |
| 89 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 90 |
11
|
public void setReferenceKey(String referenceKey) {... |
| 91 |
11
|
this.referenceKey = referenceKey; |
| 92 |
|
} |
| 93 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 94 |
12
|
public String getReferenceType() {... |
| 95 |
12
|
return referenceType; |
| 96 |
|
} |
| 97 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 98 |
11
|
public void setReferenceType(String referenceType) {... |
| 99 |
11
|
this.referenceType = referenceType; |
| 100 |
|
} |
| 101 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 102 |
24
|
public String getUserId() {... |
| 103 |
24
|
return userId; |
| 104 |
|
} |
| 105 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 106 |
17
|
public void setUserId(String userId) {... |
| 107 |
17
|
this.userId = userId; |
| 108 |
|
} |
| 109 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 110 |
13
|
public List<KeyValuePair> getKeyValueList() {... |
| 111 |
13
|
return keyValueList; |
| 112 |
|
} |
| 113 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 114 |
12
|
public void setKeyValueList(List<KeyValuePair> keyValueList) {... |
| 115 |
12
|
this.keyValueList = keyValueList; |
| 116 |
|
} |
| 117 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 118 |
8
|
@Override... |
| 119 |
|
public String toString() { |
| 120 |
8
|
return "ApplicationState[id=" + id + ", applicationId=" + applicationId |
| 121 |
|
+ ", referenceKey=" + referenceKey + ", referenceType=" |
| 122 |
|
+ referenceType + ", userId=" + userId + "]"; |
| 123 |
|
} |
| 124 |
|
} |