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