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