View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.9.0-SNAPSHOT,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.codehaus.modello.test.features;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
12  //---------------------------------/
13  
14  import org.codehaus.modello.test.features.other.PackageNameFeature;
15  import org.codehaus.modello.test.features.other.SubInterfaceInPackage;
16  
17  /**
18   * Class BidiInList.
19   * 
20   * @version $Revision$ $Date$
21   */
22  @SuppressWarnings( "all" )
23  public class BidiInList
24      implements java.io.Serializable
25  {
26  
27        //--------------------------/
28       //- Class/Member Variables -/
29      //--------------------------/
30  
31      /**
32       * Field parent.
33       */
34      private AssociationFeatures parent;
35  
36  
37        //-----------/
38       //- Methods -/
39      //-----------/
40  
41      /**
42       * Method breakAssociationFeaturesAssociation.
43       * 
44       * @param associationFeatures
45       */
46      public void breakAssociationFeaturesAssociation( AssociationFeatures associationFeatures )
47      {
48          if ( this.parent != associationFeatures )
49          {
50              throw new IllegalStateException( "associationFeatures isn't associated." );
51          }
52  
53          this.parent = null;
54      } //-- void breakAssociationFeaturesAssociation( AssociationFeatures )
55  
56      /**
57       * Method createAssociationFeaturesAssociation.
58       * 
59       * @param associationFeatures
60       */
61      public void createAssociationFeaturesAssociation( AssociationFeatures associationFeatures )
62      {
63          if ( this.parent != null )
64          {
65              breakAssociationFeaturesAssociation( this.parent );
66          }
67  
68          this.parent = associationFeatures;
69      } //-- void createAssociationFeaturesAssociation( AssociationFeatures )
70  
71      /**
72       * Get the parent field.
73       * 
74       * @return AssociationFeatures
75       */
76      public AssociationFeatures getParent()
77      {
78          return this.parent;
79      } //-- AssociationFeatures getParent()
80  
81      /**
82       * Set the parent field.
83       * 
84       * @param parent
85       */
86      public void setParent( AssociationFeatures parent )
87      {
88          if ( this.parent != null )
89          {
90              this.parent.breakBidiInListAssociation( this );
91          }
92  
93          this.parent = parent;
94  
95          if ( parent != null )
96          {
97              this.parent.createBidiInListAssociation( this );
98          }
99      } //-- void setParent( AssociationFeatures )
100 
101 }