001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 2.3.0, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.codehaus.modello.test.features; 007 008 //---------------------------------/ 009 //- Imported classes and packages -/ 010//---------------------------------/ 011 012import java.util.Collection; 013import org.codehaus.modello.test.features.other.PackageNameFeature; 014import org.codehaus.modello.test.features.other.SubInterfaceInPackage; 015 016/** 017 * 018 * <code><field><type><i>chose a 019 * type</i></type><field></code>: 020 * Test of every simple types supported. 021 * 022 * 023 * @version $Revision$ $Date$ 024 */ 025@SuppressWarnings( "all" ) 026public class AssociationFeatures 027 implements java.io.Serializable 028{ 029 030 //--------------------------/ 031 //- Class/Member Variables -/ 032 //--------------------------/ 033 034 /** 035 * Field listReferences. 036 */ 037 private java.util.List<Reference> listReferences; 038 039 /** 040 * Field setReferences. 041 */ 042 private java.util.Set<Reference> setReferences; 043 044 /** 045 * Field listStrings. 046 */ 047 private java.util.List<String> listStrings; 048 049 /** 050 * Field setStrings. 051 */ 052 private java.util.Set<String> setStrings; 053 054 /** 055 * Field properties. 056 */ 057 private java.util.Properties properties; 058 059 /** 060 * Field bidi. 061 */ 062 private Bidirectional bidi; 063 064 /** 065 * Field listOfBidis. 066 */ 067 private java.util.List<BidiInList> listOfBidis; 068 069 /** 070 * Field setOfBidis. 071 */ 072 private java.util.Set<BidiInSet> setOfBidis; 073 074 075 //-----------/ 076 //- Methods -/ 077 //-----------/ 078 079 /** 080 * Method addListOfBidi. 081 * 082 * @param bidiInList a bidiInList object. 083 */ 084 public void addListOfBidi( BidiInList bidiInList ) 085 { 086 getListOfBidis().add( bidiInList ); 087 bidiInList.createAssociationFeaturesAssociation( this ); 088 } //-- void addListOfBidi( BidiInList ) 089 090 /** 091 * Method addListReference. 092 * 093 * @param reference a reference object. 094 */ 095 public void addListReference( Reference reference ) 096 { 097 getListReferences().add( reference ); 098 } //-- void addListReference( Reference ) 099 100 /** 101 * Method addListString. 102 * 103 * @param string a string object. 104 */ 105 public void addListString( String string ) 106 { 107 getListStrings().add( string ); 108 } //-- void addListString( String ) 109 110 /** 111 * Method addProperty. 112 * 113 * @param key a key object. 114 * @param value a value object. 115 */ 116 public void addProperty( String key, String value ) 117 { 118 getProperties().put( key, value ); 119 } //-- void addProperty( String, String ) 120 121 /** 122 * Method addSetOfBidi. 123 * 124 * @param bidiInSet a bidiInSet object. 125 */ 126 public void addSetOfBidi( BidiInSet bidiInSet ) 127 { 128 getSetOfBidis().add( bidiInSet ); 129 bidiInSet.createAssociationFeaturesAssociation( this ); 130 } //-- void addSetOfBidi( BidiInSet ) 131 132 /** 133 * Method addSetReference. 134 * 135 * @param reference a reference object. 136 */ 137 public void addSetReference( Reference reference ) 138 { 139 getSetReferences().add( reference ); 140 } //-- void addSetReference( Reference ) 141 142 /** 143 * Method addSetString. 144 * 145 * @param string a string object. 146 */ 147 public void addSetString( String string ) 148 { 149 getSetStrings().add( string ); 150 } //-- void addSetString( String ) 151 152 /** 153 * Method breakBidiInListAssociation. 154 * 155 * @param bidiInList a bidiInList object. 156 */ 157 public void breakBidiInListAssociation( BidiInList bidiInList ) 158 { 159 if ( !getListOfBidis().contains( bidiInList ) ) 160 { 161 throw new IllegalStateException( "bidiInList isn't associated." ); 162 } 163 164 getListOfBidis().remove( bidiInList ); 165 } //-- void breakBidiInListAssociation( BidiInList ) 166 167 /** 168 * Method breakBidiInSetAssociation. 169 * 170 * @param bidiInSet a bidiInSet object. 171 */ 172 public void breakBidiInSetAssociation( BidiInSet bidiInSet ) 173 { 174 if ( !getSetOfBidis().contains( bidiInSet ) ) 175 { 176 throw new IllegalStateException( "bidiInSet isn't associated." ); 177 } 178 179 getSetOfBidis().remove( bidiInSet ); 180 } //-- void breakBidiInSetAssociation( BidiInSet ) 181 182 /** 183 * Method breakBidirectionalAssociation. 184 * 185 * @param bidirectional a bidirectional object. 186 */ 187 public void breakBidirectionalAssociation( Bidirectional bidirectional ) 188 { 189 if ( this.bidi != bidirectional ) 190 { 191 throw new IllegalStateException( "bidirectional isn't associated." ); 192 } 193 194 this.bidi = null; 195 } //-- void breakBidirectionalAssociation( Bidirectional ) 196 197 /** 198 * Method createBidiInListAssociation. 199 * 200 * @param bidiInList a bidiInList object. 201 */ 202 public void createBidiInListAssociation( BidiInList bidiInList ) 203 { 204 Collection listOfBidis = getListOfBidis(); 205 206 if ( listOfBidis.contains( bidiInList ) ) 207 { 208 throw new IllegalStateException( "bidiInList is already assigned." ); 209 } 210 211 listOfBidis.add( bidiInList ); 212 } //-- void createBidiInListAssociation( BidiInList ) 213 214 /** 215 * Method createBidiInSetAssociation. 216 * 217 * @param bidiInSet a bidiInSet object. 218 */ 219 public void createBidiInSetAssociation( BidiInSet bidiInSet ) 220 { 221 Collection setOfBidis = getSetOfBidis(); 222 223 if ( setOfBidis.contains( bidiInSet ) ) 224 { 225 throw new IllegalStateException( "bidiInSet is already assigned." ); 226 } 227 228 setOfBidis.add( bidiInSet ); 229 } //-- void createBidiInSetAssociation( BidiInSet ) 230 231 /** 232 * Method createBidirectionalAssociation. 233 * 234 * @param bidirectional a bidirectional object. 235 */ 236 public void createBidirectionalAssociation( Bidirectional bidirectional ) 237 { 238 if ( this.bidi != null ) 239 { 240 breakBidirectionalAssociation( this.bidi ); 241 } 242 243 this.bidi = bidirectional; 244 } //-- void createBidirectionalAssociation( Bidirectional ) 245 246 /** 247 * Get the bidi field. 248 * 249 * @return Bidirectional 250 */ 251 public Bidirectional getBidi() 252 { 253 return this.bidi; 254 } //-- Bidirectional getBidi() 255 256 /** 257 * Method getListOfBidis. 258 * 259 * @return List 260 */ 261 public java.util.List<BidiInList> getListOfBidis() 262 { 263 if ( this.listOfBidis == null ) 264 { 265 this.listOfBidis = new java.util.ArrayList<BidiInList>(); 266 } 267 268 return this.listOfBidis; 269 } //-- java.util.List<BidiInList> getListOfBidis() 270 271 /** 272 * Method getListReferences. 273 * 274 * @return List 275 */ 276 public java.util.List<Reference> getListReferences() 277 { 278 if ( this.listReferences == null ) 279 { 280 this.listReferences = new java.util.ArrayList<Reference>(); 281 } 282 283 return this.listReferences; 284 } //-- java.util.List<Reference> getListReferences() 285 286 /** 287 * Method getListStrings. 288 * 289 * @return List 290 */ 291 public java.util.List<String> getListStrings() 292 { 293 if ( this.listStrings == null ) 294 { 295 this.listStrings = new java.util.ArrayList<String>(); 296 } 297 298 return this.listStrings; 299 } //-- java.util.List<String> getListStrings() 300 301 /** 302 * Method getProperties. 303 * 304 * @return Properties 305 */ 306 public java.util.Properties getProperties() 307 { 308 if ( this.properties == null ) 309 { 310 this.properties = new org.codehaus.modello.OrderedProperties(); 311 } 312 313 return this.properties; 314 } //-- java.util.Properties getProperties() 315 316 /** 317 * Method getSetOfBidis. 318 * 319 * @return Set 320 */ 321 public java.util.Set<BidiInSet> getSetOfBidis() 322 { 323 if ( this.setOfBidis == null ) 324 { 325 this.setOfBidis = new java.util.HashSet<BidiInSet>(); 326 } 327 328 return this.setOfBidis; 329 } //-- java.util.Set<BidiInSet> getSetOfBidis() 330 331 /** 332 * Method getSetReferences. 333 * 334 * @return Set 335 */ 336 public java.util.Set<Reference> getSetReferences() 337 { 338 if ( this.setReferences == null ) 339 { 340 this.setReferences = new java.util.HashSet<Reference>(); 341 } 342 343 return this.setReferences; 344 } //-- java.util.Set<Reference> getSetReferences() 345 346 /** 347 * Method getSetStrings. 348 * 349 * @return Set 350 */ 351 public java.util.Set<String> getSetStrings() 352 { 353 if ( this.setStrings == null ) 354 { 355 this.setStrings = new java.util.HashSet<String>(); 356 } 357 358 return this.setStrings; 359 } //-- java.util.Set<String> getSetStrings() 360 361 /** 362 * Method removeListOfBidi. 363 * 364 * @param bidiInList a bidiInList object. 365 */ 366 public void removeListOfBidi( BidiInList bidiInList ) 367 { 368 bidiInList.breakAssociationFeaturesAssociation( this ); 369 getListOfBidis().remove( bidiInList ); 370 } //-- void removeListOfBidi( BidiInList ) 371 372 /** 373 * Method removeListReference. 374 * 375 * @param reference a reference object. 376 */ 377 public void removeListReference( Reference reference ) 378 { 379 getListReferences().remove( reference ); 380 } //-- void removeListReference( Reference ) 381 382 /** 383 * Method removeListString. 384 * 385 * @param string a string object. 386 */ 387 public void removeListString( String string ) 388 { 389 getListStrings().remove( string ); 390 } //-- void removeListString( String ) 391 392 /** 393 * Method removeSetOfBidi. 394 * 395 * @param bidiInSet a bidiInSet object. 396 */ 397 public void removeSetOfBidi( BidiInSet bidiInSet ) 398 { 399 bidiInSet.breakAssociationFeaturesAssociation( this ); 400 getSetOfBidis().remove( bidiInSet ); 401 } //-- void removeSetOfBidi( BidiInSet ) 402 403 /** 404 * Method removeSetReference. 405 * 406 * @param reference a reference object. 407 */ 408 public void removeSetReference( Reference reference ) 409 { 410 getSetReferences().remove( reference ); 411 } //-- void removeSetReference( Reference ) 412 413 /** 414 * Method removeSetString. 415 * 416 * @param string a string object. 417 */ 418 public void removeSetString( String string ) 419 { 420 getSetStrings().remove( string ); 421 } //-- void removeSetString( String ) 422 423 /** 424 * Set the bidi field. 425 * 426 * @param bidi a bidi object. 427 */ 428 public void setBidi( Bidirectional bidi ) 429 { 430 if ( this.bidi != null ) 431 { 432 this.bidi.breakAssociationFeaturesAssociation( this ); 433 } 434 435 this.bidi = bidi; 436 437 if ( bidi != null ) 438 { 439 this.bidi.createAssociationFeaturesAssociation( this ); 440 } 441 } //-- void setBidi( Bidirectional ) 442 443 /** 444 * Set the listOfBidis field. 445 * 446 * @param listOfBidis a listOfBidis object. 447 */ 448 public void setListOfBidis( java.util.List<BidiInList> listOfBidis ) 449 { 450 this.listOfBidis = listOfBidis; 451 } //-- void setListOfBidis( java.util.List ) 452 453 /** 454 * Set the listReferences field. 455 * 456 * @param listReferences a listReferences object. 457 */ 458 public void setListReferences( java.util.List<Reference> listReferences ) 459 { 460 this.listReferences = listReferences; 461 } //-- void setListReferences( java.util.List ) 462 463 /** 464 * Set the listStrings field. 465 * 466 * @param listStrings a listStrings object. 467 */ 468 public void setListStrings( java.util.List<String> listStrings ) 469 { 470 this.listStrings = listStrings; 471 } //-- void setListStrings( java.util.List ) 472 473 /** 474 * Set the properties field. 475 * 476 * @param properties a properties object. 477 */ 478 public void setProperties( java.util.Properties properties ) 479 { 480 this.properties = properties; 481 } //-- void setProperties( java.util.Properties ) 482 483 /** 484 * Set the setOfBidis field. 485 * 486 * @param setOfBidis a setOfBidis object. 487 */ 488 public void setSetOfBidis( java.util.Set<BidiInSet> setOfBidis ) 489 { 490 this.setOfBidis = setOfBidis; 491 } //-- void setSetOfBidis( java.util.Set ) 492 493 /** 494 * Set the setReferences field. 495 * 496 * @param setReferences a setReferences object. 497 */ 498 public void setSetReferences( java.util.Set<Reference> setReferences ) 499 { 500 this.setReferences = setReferences; 501 } //-- void setSetReferences( java.util.Set ) 502 503 /** 504 * Set the setStrings field. 505 * 506 * @param setStrings a setStrings object. 507 */ 508 public void setSetStrings( java.util.Set<String> setStrings ) 509 { 510 this.setStrings = setStrings; 511 } //-- void setSetStrings( java.util.Set ) 512 513}