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