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 org.codehaus.modello.test.features.other.PackageNameFeature; 013import org.codehaus.modello.test.features.other.SubInterfaceInPackage; 014 015/** 016 * Class BidiInList. 017 * 018 * @version $Revision$ $Date$ 019 */ 020@SuppressWarnings( "all" ) 021public class BidiInList 022 implements java.io.Serializable 023{ 024 025 //--------------------------/ 026 //- Class/Member Variables -/ 027 //--------------------------/ 028 029 /** 030 * Field parent. 031 */ 032 private AssociationFeatures parent; 033 034 035 //-----------/ 036 //- Methods -/ 037 //-----------/ 038 039 /** 040 * Method breakAssociationFeaturesAssociation. 041 * 042 * @param associationFeatures a associationFeatures object. 043 */ 044 public void breakAssociationFeaturesAssociation( AssociationFeatures associationFeatures ) 045 { 046 if ( this.parent != associationFeatures ) 047 { 048 throw new IllegalStateException( "associationFeatures isn't associated." ); 049 } 050 051 this.parent = null; 052 } //-- void breakAssociationFeaturesAssociation( AssociationFeatures ) 053 054 /** 055 * Method createAssociationFeaturesAssociation. 056 * 057 * @param associationFeatures a associationFeatures object. 058 */ 059 public void createAssociationFeaturesAssociation( AssociationFeatures associationFeatures ) 060 { 061 if ( this.parent != null ) 062 { 063 breakAssociationFeaturesAssociation( this.parent ); 064 } 065 066 this.parent = associationFeatures; 067 } //-- void createAssociationFeaturesAssociation( AssociationFeatures ) 068 069 /** 070 * Get the parent field. 071 * 072 * @return AssociationFeatures 073 */ 074 public AssociationFeatures getParent() 075 { 076 return this.parent; 077 } //-- AssociationFeatures getParent() 078 079 /** 080 * Set the parent field. 081 * 082 * @param parent a parent object. 083 */ 084 public void setParent( AssociationFeatures parent ) 085 { 086 if ( this.parent != null ) 087 { 088 this.parent.breakBidiInListAssociation( this ); 089 } 090 091 this.parent = parent; 092 093 if ( parent != null ) 094 { 095 this.parent.createBidiInListAssociation( this ); 096 } 097 } //-- void setParent( AssociationFeatures ) 098 099}