001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 2.1.2,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.apache.maven.doxia.module.fml.model;
007
008/**
009 * 
010 *         FAQ part.
011 *       
012 * 
013 * @version $Revision$ $Date$
014 */
015@SuppressWarnings( "all" )
016public class Part
017    implements java.io.Serializable
018{
019
020      //--------------------------/
021     //- Class/Member Variables -/
022    //--------------------------/
023
024    /**
025     * 
026     *             The identifier of the part.
027     *           
028     */
029    private String id;
030
031    /**
032     * 
033     *             The title of the FAQ part.
034     *           
035     */
036    private String title;
037
038    /**
039     * Field faqs.
040     */
041    private java.util.List<Faq> faqs;
042
043
044      //-----------/
045     //- Methods -/
046    //-----------/
047
048    /**
049     * Method addFaq.
050     * 
051     * @param faq a faq object.
052     */
053    public void addFaq( Faq faq )
054    {
055        getFaqs().add( faq );
056    } //-- void addFaq( Faq )
057
058    /**
059     * Method equals.
060     * 
061     * @param other a other object.
062     * @return boolean
063     */
064    public boolean equals( Object other )
065    {
066        if ( this == other )
067        {
068            return true;
069        }
070
071        if ( !( other instanceof Part ) )
072        {
073            return false;
074        }
075
076        Part that = (Part) other;
077        boolean result = true;
078
079        result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );
080        result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
081        result = result && ( getFaqs() == null ? that.getFaqs() == null : getFaqs().equals( that.getFaqs() ) );
082
083        return result;
084    } //-- boolean equals( Object )
085
086    /**
087     * Method getFaqs.
088     * 
089     * @return List
090     */
091    public java.util.List<Faq> getFaqs()
092    {
093        if ( this.faqs == null )
094        {
095            this.faqs = new java.util.ArrayList<Faq>();
096        }
097
098        return this.faqs;
099    } //-- 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}