1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.common.lib.to;
20
21 import org.apache.commons.lang3.builder.EqualsBuilder;
22 import org.apache.commons.lang3.builder.HashCodeBuilder;
23 import org.apache.syncope.common.lib.BaseBean;
24 import org.apache.syncope.common.lib.types.ExecStatus;
25
26
27
28
29 public class PropagationStatus implements BaseBean {
30
31 private static final long serialVersionUID = 3921498450222857690L;
32
33
34
35
36 private ConnObject beforeObj;
37
38
39
40
41 private ConnObject afterObj;
42
43
44
45
46 private String resource;
47
48
49
50
51 private ExecStatus status;
52
53
54
55
56 private String failureReason;
57
58 public ConnObject getAfterObj() {
59 return afterObj;
60 }
61
62 public void setAfterObj(final ConnObject afterObj) {
63 this.afterObj = afterObj;
64 }
65
66 public ConnObject getBeforeObj() {
67 return beforeObj;
68 }
69
70 public void setBeforeObj(final ConnObject beforeObj) {
71 this.beforeObj = beforeObj;
72 }
73
74 public String getResource() {
75 return resource;
76 }
77
78 public void setResource(final String resource) {
79 this.resource = resource;
80 }
81
82 public ExecStatus getStatus() {
83 return status;
84 }
85
86 public void setStatus(final ExecStatus status) {
87 this.status = status;
88 }
89
90 public String getFailureReason() {
91 return failureReason;
92 }
93
94 public void setFailureReason(final String failureReason) {
95 this.failureReason = failureReason;
96 }
97
98 @Override
99 public int hashCode() {
100 return new HashCodeBuilder().
101 append(beforeObj).
102 append(afterObj).
103 append(resource).
104 append(status).
105 append(failureReason).
106 build();
107 }
108
109 @Override
110 public boolean equals(final Object obj) {
111 if (this == obj) {
112 return true;
113 }
114 if (obj == null) {
115 return false;
116 }
117 if (getClass() != obj.getClass()) {
118 return false;
119 }
120 final PropagationStatus other = (PropagationStatus) obj;
121 return new EqualsBuilder().
122 append(beforeObj, other.beforeObj).
123 append(afterObj, other.afterObj).
124 append(resource, other.resource).
125 append(status, other.status).
126 append(failureReason, other.failureReason).
127 build();
128 }
129 }