1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.apache.maven.doxia.module.fml.model;
25
26
27
28
29
30
31
32
33 @SuppressWarnings( "all" )
34 public class Part
35 implements java.io.Serializable
36 {
37
38
39
40
41
42
43
44
45
46
47 private String id;
48
49
50
51
52
53
54 private String title;
55
56
57
58
59 private java.util.List<Faq> faqs;
60
61
62
63
64
65
66
67
68
69
70
71 public void addFaq( Faq faq )
72 {
73 getFaqs().add( faq );
74 }
75
76
77
78
79
80
81
82 public boolean equals( Object other )
83 {
84 if ( this == other )
85 {
86 return true;
87 }
88
89 if ( !( other instanceof Part ) )
90 {
91 return false;
92 }
93
94 Part that = (Part) other;
95 boolean result = true;
96
97 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
98 result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
99 result = result && ( getFaqs() == null ? that.getFaqs() == null : getFaqs().equals( that.getFaqs() ) );
100
101 return result;
102 }
103
104
105
106
107
108
109 public java.util.List<Faq> getFaqs()
110 {
111 if ( this.faqs == null )
112 {
113 this.faqs = new java.util.ArrayList<Faq>();
114 }
115
116 return this.faqs;
117 }
118
119
120
121
122
123
124 public String getId()
125 {
126 return this.id;
127 }
128
129
130
131
132
133
134 public String getTitle()
135 {
136 return this.title;
137 }
138
139
140
141
142
143
144 public int hashCode()
145 {
146 int result = 17;
147
148 result = 37 * result + ( id != null ? id.hashCode() : 0 );
149 result = 37 * result + ( title != null ? title.hashCode() : 0 );
150 result = 37 * result + ( faqs != null ? faqs.hashCode() : 0 );
151
152 return result;
153 }
154
155
156
157
158
159
160 public void removeFaq( Faq faq )
161 {
162 getFaqs().remove( faq );
163 }
164
165
166
167
168
169
170 public void setFaqs( java.util.List<Faq> faqs )
171 {
172 this.faqs = faqs;
173 }
174
175
176
177
178
179
180 public void setId( String id )
181 {
182 this.id = id;
183 }
184
185
186
187
188
189
190 public void setTitle( String title )
191 {
192 this.title = title;
193 }
194
195
196
197
198
199
200 public java.lang.String toString()
201 {
202 StringBuilder buf = new StringBuilder( 128 );
203
204 buf.append( "id = '" );
205 buf.append( getId() );
206 buf.append( "'" );
207 buf.append( "\n" );
208 buf.append( "title = '" );
209 buf.append( getTitle() );
210 buf.append( "'" );
211 buf.append( "\n" );
212 buf.append( "faqs = '" );
213 buf.append( getFaqs() );
214 buf.append( "'" );
215
216 return buf.toString();
217 }
218
219 }