| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
package org.itracker.model; |
| 20 |
|
|
| 21 |
|
import java.io.Serializable; |
| 22 |
|
import java.util.Comparator; |
| 23 |
|
|
| 24 |
|
import org.apache.commons.lang.builder.CompareToBuilder; |
| 25 |
|
import org.apache.commons.lang.builder.ToStringBuilder; |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
@author |
| 31 |
|
|
|
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 10 |
Complexity Density: 1.11 |
|
| 32 |
|
public class ProjectScript extends AbstractEntity { |
| 33 |
|
|
| 34 |
|
public static final FieldPriorityComparator FIELD_PRIORITY_COMPARATOR = new FieldPriorityComparator(); |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
private static final long serialVersionUID = 1L; |
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
private Project project; |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
private Integer fieldId; |
| 55 |
|
|
| 56 |
|
|
| 57 |
|
private WorkflowScript script; |
| 58 |
|
|
| 59 |
|
private int priority; |
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 70 |
0
|
public ProjectScript() {... |
| 71 |
|
} |
| 72 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 73 |
0
|
public Project getProject() {... |
| 74 |
0
|
return project; |
| 75 |
|
} |
| 76 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 77 |
0
|
public void setProject(Project project) {... |
| 78 |
0
|
this.project = project; |
| 79 |
|
} |
| 80 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 81 |
0
|
public WorkflowScript getScript() {... |
| 82 |
0
|
return script; |
| 83 |
|
} |
| 84 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 85 |
0
|
public void setScript(WorkflowScript script) {... |
| 86 |
0
|
this.script = script; |
| 87 |
|
} |
| 88 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 89 |
0
|
public Integer getFieldId() {... |
| 90 |
0
|
return fieldId; |
| 91 |
|
} |
| 92 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 93 |
0
|
public void setFieldId(Integer fieldId) {... |
| 94 |
0
|
this.fieldId = fieldId; |
| 95 |
|
} |
| 96 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 97 |
0
|
public int getPriority() {... |
| 98 |
0
|
return priority; |
| 99 |
|
} |
| 100 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 101 |
0
|
public void setPriority(int priority) {... |
| 102 |
0
|
this.priority = priority; |
| 103 |
|
} |
| 104 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 1 |
|
| 105 |
|
public static class FieldPriorityComparator implements |
| 106 |
|
Comparator<ProjectScript>, Serializable { |
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
private static final long serialVersionUID = 1L; |
| 111 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 112 |
0
|
public int compare(ProjectScript a, ProjectScript b) {... |
| 113 |
|
|
| 114 |
0
|
return new CompareToBuilder().append(a.getFieldId(), b.getFieldId()).append(a.getPriority(), b.getPriority()).toComparison(); |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
} |
| 118 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 119 |
0
|
@Override... |
| 120 |
|
public String toString() { |
| 121 |
0
|
return new ToStringBuilder(this).append("id", getId()).append("script", getScript()).append( |
| 122 |
|
"fieldId", getFieldId()).append("priority", getPriority()).append( |
| 123 |
|
"project", getProject()).toString(); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
} |