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