1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| package org.qedeq.kernel.dto.module; |
19 |
| |
20 |
| import org.qedeq.kernel.base.module.LocationList; |
21 |
| import org.qedeq.kernel.base.module.Specification; |
22 |
| import org.qedeq.kernel.utility.EqualsUtility; |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| |
34 |
| public final class SpecificationVo implements Specification { |
35 |
| |
36 |
| |
37 |
| private String name; |
38 |
| |
39 |
| |
40 |
| private String ruleVersion; |
41 |
| |
42 |
| |
43 |
| private LocationList locationList; |
44 |
| |
45 |
| |
46 |
| |
47 |
| |
48 |
| |
49 |
| |
50 |
| |
51 |
| |
52 |
| |
53 |
74
| public SpecificationVo(final String name, final String ruleVersion,
|
54 |
| final LocationList locations) { |
55 |
74
| this.name = name;
|
56 |
74
| this.ruleVersion = ruleVersion;
|
57 |
74
| this.locationList = locations;
|
58 |
| } |
59 |
| |
60 |
| |
61 |
| |
62 |
| |
63 |
212
| public SpecificationVo() {
|
64 |
| |
65 |
| } |
66 |
| |
67 |
194
| public final void setName(final String name) {
|
68 |
194
| this.name = name;
|
69 |
| } |
70 |
| |
71 |
1423
| public final String getName() {
|
72 |
1423
| return name;
|
73 |
| } |
74 |
| |
75 |
194
| public final void setRuleVersion(final String ruleVersion) {
|
76 |
194
| this.ruleVersion = ruleVersion;
|
77 |
| } |
78 |
| |
79 |
1405
| public final String getRuleVersion() {
|
80 |
1405
| return ruleVersion;
|
81 |
| } |
82 |
| |
83 |
| |
84 |
| |
85 |
| |
86 |
| |
87 |
| |
88 |
194
| public final void setLocationList(final LocationListVo locations) {
|
89 |
194
| this.locationList = locations;
|
90 |
| } |
91 |
| |
92 |
1459
| public final LocationList getLocationList() {
|
93 |
1459
| return locationList;
|
94 |
| } |
95 |
| |
96 |
371
| public boolean equals(final Object obj) {
|
97 |
371
| if (!(obj instanceof SpecificationVo)) {
|
98 |
11
| return false;
|
99 |
| } |
100 |
360
| final SpecificationVo other = (SpecificationVo) obj;
|
101 |
360
| return EqualsUtility.equals(getName(), other.getName())
|
102 |
| && EqualsUtility.equals(getRuleVersion(), other.getRuleVersion()) |
103 |
| && EqualsUtility.equals(getLocationList(), other.getLocationList()); |
104 |
| } |
105 |
| |
106 |
313
| public int hashCode() {
|
107 |
313
| return (getName() != null ? getName().hashCode() : 0)
|
108 |
313
| ^ (getRuleVersion() != null ? 1 ^ getRuleVersion().hashCode() : 0)
|
109 |
313
| ^ (getLocationList() != null ? 1 ^ getLocationList().hashCode() : 0);
|
110 |
| } |
111 |
| |
112 |
199
| public String toString() {
|
113 |
199
| return "Name: " + name + ", Rule Version: " + ruleVersion + "\n" + locationList;
|
114 |
| } |
115 |
| |
116 |
| } |