1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.external.riksdagen.utskottsforslag.impl;
10
11 import java.io.Serializable;
12 import java.util.ArrayList;
13 import java.util.Collection;
14 import java.util.List;
15 import javax.persistence.CascadeType;
16 import javax.persistence.Column;
17 import javax.persistence.Entity;
18 import javax.persistence.GeneratedValue;
19 import javax.persistence.GenerationType;
20 import javax.persistence.Id;
21 import javax.persistence.Inheritance;
22 import javax.persistence.InheritanceType;
23 import javax.persistence.JoinColumn;
24 import javax.persistence.OneToMany;
25 import javax.persistence.Table;
26 import javax.xml.bind.annotation.XmlAccessType;
27 import javax.xml.bind.annotation.XmlAccessorType;
28 import javax.xml.bind.annotation.XmlAttribute;
29 import javax.xml.bind.annotation.XmlElement;
30 import javax.xml.bind.annotation.XmlType;
31 import com.hack23.cia.model.common.api.ModelObject;
32 import org.jvnet.jaxb2_commons.lang.Equals;
33 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
34 import org.jvnet.jaxb2_commons.lang.HashCode;
35 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
36 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
37 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
38 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
39 import org.jvnet.jaxb2_commons.lang.ToString;
40 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
41 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
42 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64 @XmlAccessorType(XmlAccessType.FIELD)
65 @XmlType(name = "CommitteeProposalContainer", propOrder = {
66 "committeeProposalList"
67 })
68 @Entity(name = "CommitteeProposalContainer")
69 @Table(name = "COMMITTEE_PROPOSAL_CONTAINER")
70 @Inheritance(strategy = InheritanceType.JOINED)
71 public class CommitteeProposalContainer
72 implements Serializable, ModelObject, Equals, HashCode, ToString
73 {
74
75 @XmlElement(name = "utskottsforslag", required = true)
76 protected List<CommitteeProposalData> committeeProposalList;
77 @XmlAttribute(name = "Hjid")
78 protected Long hjid;
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102 @OneToMany(targetEntity = CommitteeProposalData.class, cascade = {
103 CascadeType.ALL
104 })
105 @JoinColumn(name = "COMMITTEE_PROPOSAL_LIST_COMM_0")
106 public List<CommitteeProposalData> getCommitteeProposalList() {
107 if (committeeProposalList == null) {
108 committeeProposalList = new ArrayList<CommitteeProposalData>();
109 }
110 return this.committeeProposalList;
111 }
112
113
114
115
116
117 public void setCommitteeProposalList(List<CommitteeProposalData> committeeProposalList) {
118 this.committeeProposalList = committeeProposalList;
119 }
120
121 public CommitteeProposalContainer withCommitteeProposalList(CommitteeProposalData... values) {
122 if (values!= null) {
123 for (CommitteeProposalData value: values) {
124 getCommitteeProposalList().add(value);
125 }
126 }
127 return this;
128 }
129
130 public CommitteeProposalContainer withCommitteeProposalList(Collection<CommitteeProposalData> values) {
131 if (values!= null) {
132 getCommitteeProposalList().addAll(values);
133 }
134 return this;
135 }
136
137 public CommitteeProposalContainer withCommitteeProposalList(List<CommitteeProposalData> committeeProposalList) {
138 setCommitteeProposalList(committeeProposalList);
139 return this;
140 }
141
142 public String toString() {
143 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
144 final StringBuilder buffer = new StringBuilder();
145 append(null, buffer, strategy);
146 return buffer.toString();
147 }
148
149 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
150 strategy.appendStart(locator, this, buffer);
151 appendFields(locator, buffer, strategy);
152 strategy.appendEnd(locator, this, buffer);
153 return buffer;
154 }
155
156 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
157 {
158 List<CommitteeProposalData> theCommitteeProposalList;
159 theCommitteeProposalList = (((this.committeeProposalList!= null)&&(!this.committeeProposalList.isEmpty()))?this.getCommitteeProposalList():null);
160 strategy.appendField(locator, this, "committeeProposalList", buffer, theCommitteeProposalList);
161 }
162 return buffer;
163 }
164
165
166
167
168
169
170
171
172
173 @Id
174 @Column(name = "HJID")
175 @GeneratedValue(strategy = GenerationType.AUTO)
176 public Long getHjid() {
177 return hjid;
178 }
179
180
181
182
183
184
185
186
187
188 public void setHjid(Long value) {
189 this.hjid = value;
190 }
191
192 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
193 if ((object == null)||(this.getClass()!= object.getClass())) {
194 return false;
195 }
196 if (this == object) {
197 return true;
198 }
199 final CommitteeProposalContainer that = ((CommitteeProposalContainer) object);
200 {
201 List<CommitteeProposalData> lhsCommitteeProposalList;
202 lhsCommitteeProposalList = (((this.committeeProposalList!= null)&&(!this.committeeProposalList.isEmpty()))?this.getCommitteeProposalList():null);
203 List<CommitteeProposalData> rhsCommitteeProposalList;
204 rhsCommitteeProposalList = (((that.committeeProposalList!= null)&&(!that.committeeProposalList.isEmpty()))?that.getCommitteeProposalList():null);
205 if (!strategy.equals(LocatorUtils.property(thisLocator, "committeeProposalList", lhsCommitteeProposalList), LocatorUtils.property(thatLocator, "committeeProposalList", rhsCommitteeProposalList), lhsCommitteeProposalList, rhsCommitteeProposalList)) {
206 return false;
207 }
208 }
209 return true;
210 }
211
212 public boolean equals(Object object) {
213 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
214 return equals(null, null, object, strategy);
215 }
216
217 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
218 int currentHashCode = 1;
219 {
220 List<CommitteeProposalData> theCommitteeProposalList;
221 theCommitteeProposalList = (((this.committeeProposalList!= null)&&(!this.committeeProposalList.isEmpty()))?this.getCommitteeProposalList():null);
222 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "committeeProposalList", theCommitteeProposalList), currentHashCode, theCommitteeProposalList);
223 }
224 return currentHashCode;
225 }
226
227 public int hashCode() {
228 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
229 return this.hashCode(null, strategy);
230 }
231
232 }