001/* 002 Licensed to the Apache Software Foundation (ASF) under one 003 or more contributor license agreements. See the NOTICE file 004 distributed with this work for additional information 005 regarding copyright ownership. The ASF licenses this file 006 to you under the Apache License, Version 2.0 (the 007 "License"); you may not use this file except in compliance 008 with the License. You may obtain a copy of the License at 009 010 http://www.apache.org/licenses/LICENSE-2.0 011 012 Unless required by applicable law or agreed to in writing, 013 software distributed under the License is distributed on an 014 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 KIND, either express or implied. See the License for the 016 specific language governing permissions and limitations 017 under the License. 018 =================== DO NOT EDIT THIS FILE ==================== 019 Generated by Modello 2.5.1, 020 any modifications will be overwritten. 021 ============================================================== 022 */ 023 024package org.apache.maven.doxia.module.fml.model; 025 026/** 027 * 028 * FAQ part. 029 * 030 * 031 * @version $Revision$ $Date$ 032 */ 033@SuppressWarnings( "all" ) 034public class Part 035 implements java.io.Serializable 036{ 037 038 //--------------------------/ 039 //- Class/Member Variables -/ 040 //--------------------------/ 041 042 /** 043 * 044 * The identifier of the part. 045 * 046 */ 047 private String id; 048 049 /** 050 * 051 * The title of the FAQ part. 052 * 053 */ 054 private String title; 055 056 /** 057 * Field faqs. 058 */ 059 private java.util.List<Faq> faqs; 060 061 062 //-----------/ 063 //- Methods -/ 064 //-----------/ 065 066 /** 067 * Method addFaq. 068 * 069 * @param faq a faq object. 070 */ 071 public void addFaq( Faq faq ) 072 { 073 getFaqs().add( faq ); 074 } //-- void addFaq( Faq ) 075 076 /** 077 * Method equals. 078 * 079 * @param other a other object. 080 * @return boolean 081 */ 082 public boolean equals( Object other ) 083 { 084 if ( this == other ) 085 { 086 return true; 087 } 088 089 if ( !( other instanceof Part ) ) 090 { 091 return false; 092 } 093 094 Part that = (Part) other; 095 boolean result = true; 096 097 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) ); 098 result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) ); 099 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}