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