1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.internal.application.data.committee.impl;
10
11 import java.io.Serializable;
12 import javax.persistence.Basic;
13 import javax.persistence.Column;
14 import javax.persistence.Embeddable;
15 import javax.xml.bind.annotation.XmlAccessType;
16 import javax.xml.bind.annotation.XmlAccessorType;
17 import javax.xml.bind.annotation.XmlElement;
18 import javax.xml.bind.annotation.XmlType;
19 import com.hack23.cia.model.common.api.ModelObject;
20 import org.jvnet.jaxb2_commons.lang.Equals;
21 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
22 import org.jvnet.jaxb2_commons.lang.HashCode;
23 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
24 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
25 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
26 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
27 import org.jvnet.jaxb2_commons.lang.ToString;
28 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
29 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
30 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 @XmlAccessorType(XmlAccessType.FIELD)
54 @XmlType(name = "RiksdagenCommitteeEmbeddedId", propOrder = {
55 "detail",
56 "orgCode"
57 })
58 @Embeddable
59 public class RiksdagenCommitteeEmbeddedId
60 implements Serializable, ModelObject, Equals, HashCode, ToString
61 {
62
63 private final static long serialVersionUID = 1L;
64 @XmlElement(required = true)
65 protected String detail;
66 @XmlElement(required = true)
67 protected String orgCode;
68
69
70
71
72
73
74
75
76
77 @Basic
78 @Column(name = "DETAIL", length = 255)
79 public String getDetail() {
80 return detail;
81 }
82
83
84
85
86
87
88
89
90
91 public void setDetail(String value) {
92 this.detail = value;
93 }
94
95
96
97
98
99
100
101
102
103 @Basic
104 @Column(name = "ORG_CODE", length = 255)
105 public String getOrgCode() {
106 return orgCode;
107 }
108
109
110
111
112
113
114
115
116
117 public void setOrgCode(String value) {
118 this.orgCode = value;
119 }
120
121 public RiksdagenCommitteeEmbeddedId withDetail(String value) {
122 setDetail(value);
123 return this;
124 }
125
126 public RiksdagenCommitteeEmbeddedId withOrgCode(String value) {
127 setOrgCode(value);
128 return this;
129 }
130
131 public String toString() {
132 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
133 final StringBuilder buffer = new StringBuilder();
134 append(null, buffer, strategy);
135 return buffer.toString();
136 }
137
138 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
139 strategy.appendStart(locator, this, buffer);
140 appendFields(locator, buffer, strategy);
141 strategy.appendEnd(locator, this, buffer);
142 return buffer;
143 }
144
145 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
146 {
147 String theDetail;
148 theDetail = this.getDetail();
149 strategy.appendField(locator, this, "detail", buffer, theDetail);
150 }
151 {
152 String theOrgCode;
153 theOrgCode = this.getOrgCode();
154 strategy.appendField(locator, this, "orgCode", buffer, theOrgCode);
155 }
156 return buffer;
157 }
158
159 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
160 if ((object == null)||(this.getClass()!= object.getClass())) {
161 return false;
162 }
163 if (this == object) {
164 return true;
165 }
166 final RiksdagenCommitteeEmbeddedId that = ((RiksdagenCommitteeEmbeddedId) object);
167 {
168 String lhsDetail;
169 lhsDetail = this.getDetail();
170 String rhsDetail;
171 rhsDetail = that.getDetail();
172 if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail)) {
173 return false;
174 }
175 }
176 {
177 String lhsOrgCode;
178 lhsOrgCode = this.getOrgCode();
179 String rhsOrgCode;
180 rhsOrgCode = that.getOrgCode();
181 if (!strategy.equals(LocatorUtils.property(thisLocator, "orgCode", lhsOrgCode), LocatorUtils.property(thatLocator, "orgCode", rhsOrgCode), lhsOrgCode, rhsOrgCode)) {
182 return false;
183 }
184 }
185 return true;
186 }
187
188 public boolean equals(Object object) {
189 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
190 return equals(null, null, object, strategy);
191 }
192
193 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
194 int currentHashCode = 1;
195 {
196 String theDetail;
197 theDetail = this.getDetail();
198 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail);
199 }
200 {
201 String theOrgCode;
202 theOrgCode = this.getOrgCode();
203 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orgCode", theOrgCode), currentHashCode, theOrgCode);
204 }
205 return currentHashCode;
206 }
207
208 public int hashCode() {
209 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
210 return this.hashCode(null, strategy);
211 }
212
213 }