View Javadoc
1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    
4    Generated by Modello 2.4.0,
5    
6    any modifications will be overwritten.
7    
8    ==============================================================
9    */
10  
11  package org.apache.maven.doxia.module.fml.model;
12  
13  /**
14   * 
15   *         FAQ part.
16   *       
17   * 
18   * @version $Revision$ $Date$
19   */
20  @SuppressWarnings( "all" )
21  public class Part
22      implements java.io.Serializable
23  {
24  
25        //--------------------------/
26       //- Class/Member Variables -/
27      //--------------------------/
28  
29      /**
30       * 
31       *             The identifier of the part.
32       *           
33       */
34      private String id;
35  
36      /**
37       * 
38       *             The title of the FAQ part.
39       *           
40       */
41      private String title;
42  
43      /**
44       * Field faqs.
45       */
46      private java.util.List<Faq> faqs;
47  
48  
49        //-----------/
50       //- Methods -/
51      //-----------/
52  
53      /**
54       * Method addFaq.
55       * 
56       * @param faq a faq object.
57       */
58      public void addFaq( Faq faq )
59      {
60          getFaqs().add( faq );
61      } //-- void addFaq( Faq )
62  
63      /**
64       * Method equals.
65       * 
66       * @param other a other object.
67       * @return boolean
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      } //-- boolean equals( Object )
90  
91      /**
92       * Method getFaqs.
93       * 
94       * @return List
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     } //-- java.util.List<Faq> getFaqs()
105 
106     /**
107      * Get the identifier of the part.
108      * 
109      * @return String
110      */
111     public String getId()
112     {
113         return this.id;
114     } //-- String getId()
115 
116     /**
117      * Get the title of the FAQ part.
118      * 
119      * @return String
120      */
121     public String getTitle()
122     {
123         return this.title;
124     } //-- String getTitle()
125 
126     /**
127      * Method hashCode.
128      * 
129      * @return int
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     } //-- int hashCode()
141 
142     /**
143      * Method removeFaq.
144      * 
145      * @param faq a faq object.
146      */
147     public void removeFaq( Faq faq )
148     {
149         getFaqs().remove( faq );
150     } //-- void removeFaq( Faq )
151 
152     /**
153      * Set a list of FAQ.
154      * 
155      * @param faqs a faqs object.
156      */
157     public void setFaqs( java.util.List<Faq> faqs )
158     {
159         this.faqs = faqs;
160     } //-- void setFaqs( java.util.List )
161 
162     /**
163      * Set the identifier of the part.
164      * 
165      * @param id a id object.
166      */
167     public void setId( String id )
168     {
169         this.id = id;
170     } //-- void setId( String )
171 
172     /**
173      * Set the title of the FAQ part.
174      * 
175      * @param title a title object.
176      */
177     public void setTitle( String title )
178     {
179         this.title = title;
180     } //-- void setTitle( String )
181 
182     /**
183      * Method toString.
184      * 
185      * @return String
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     } //-- java.lang.String toString()
205 
206 }