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