View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.doxia.module.fml.model;
25  
26  /**
27   * 
28   *         FAQ part.
29   *       
30   * 
31   * @version $Revision$ $Date$
32   */
33  @SuppressWarnings( "all" )
34  public class Part
35      implements java.io.Serializable
36  {
37  
38        //--------------------------/
39       //- Class/Member Variables -/
40      //--------------------------/
41  
42      /**
43       * 
44       *             The identifier of the part.
45       *           
46       */
47      private String id;
48  
49      /**
50       * 
51       *             The title of the FAQ part.
52       *           
53       */
54      private String title;
55  
56      /**
57       * Field faqs.
58       */
59      private java.util.List<Faq> faqs;
60  
61  
62        //-----------/
63       //- Methods -/
64      //-----------/
65  
66      /**
67       * Method addFaq.
68       * 
69       * @param faq a faq object.
70       */
71      public void addFaq( Faq faq )
72      {
73          getFaqs().add( faq );
74      } //-- void addFaq( Faq )
75  
76      /**
77       * Method equals.
78       * 
79       * @param other a other object.
80       * @return boolean
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     } //-- boolean equals( Object )
103 
104     /**
105      * Method getFaqs.
106      * 
107      * @return List
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     } //-- java.util.List<Faq> getFaqs()
118 
119     /**
120      * Get the identifier of the part.
121      * 
122      * @return String
123      */
124     public String getId()
125     {
126         return this.id;
127     } //-- String getId()
128 
129     /**
130      * Get the title of the FAQ part.
131      * 
132      * @return String
133      */
134     public String getTitle()
135     {
136         return this.title;
137     } //-- String getTitle()
138 
139     /**
140      * Method hashCode.
141      * 
142      * @return int
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     } //-- int hashCode()
154 
155     /**
156      * Method removeFaq.
157      * 
158      * @param faq a faq object.
159      */
160     public void removeFaq( Faq faq )
161     {
162         getFaqs().remove( faq );
163     } //-- void removeFaq( Faq )
164 
165     /**
166      * Set a list of FAQ.
167      * 
168      * @param faqs a faqs object.
169      */
170     public void setFaqs( java.util.List<Faq> faqs )
171     {
172         this.faqs = faqs;
173     } //-- void setFaqs( java.util.List )
174 
175     /**
176      * Set the identifier of the part.
177      * 
178      * @param id a id object.
179      */
180     public void setId( String id )
181     {
182         this.id = id;
183     } //-- void setId( String )
184 
185     /**
186      * Set the title of the FAQ part.
187      * 
188      * @param title a title object.
189      */
190     public void setTitle( String title )
191     {
192         this.title = title;
193     } //-- void setTitle( String )
194 
195     /**
196      * Method toString.
197      * 
198      * @return String
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     } //-- java.lang.String toString()
218 
219 }