001/*
002 =================== DO NOT EDIT THIS FILE ====================
003 Generated by Modello 1.9.0-SNAPSHOT,
004 any modifications will be overwritten.
005 ==============================================================
006 */
007
008package org.codehaus.modello.test.features;
009
010  //---------------------------------/
011 //- Imported classes and packages -/
012//---------------------------------/
013
014import org.codehaus.modello.test.features.other.PackageNameFeature;
015import org.codehaus.modello.test.features.other.SubInterfaceInPackage;
016
017/**
018 * Class BidiInList.
019 * 
020 * @version $Revision$ $Date$
021 */
022@SuppressWarnings( "all" )
023public class BidiInList
024    implements java.io.Serializable
025{
026
027      //--------------------------/
028     //- Class/Member Variables -/
029    //--------------------------/
030
031    /**
032     * Field parent.
033     */
034    private AssociationFeatures parent;
035
036
037      //-----------/
038     //- Methods -/
039    //-----------/
040
041    /**
042     * Method breakAssociationFeaturesAssociation.
043     * 
044     * @param associationFeatures
045     */
046    public void breakAssociationFeaturesAssociation( AssociationFeatures associationFeatures )
047    {
048        if ( this.parent != associationFeatures )
049        {
050            throw new IllegalStateException( "associationFeatures isn't associated." );
051        }
052
053        this.parent = null;
054    } //-- void breakAssociationFeaturesAssociation( AssociationFeatures )
055
056    /**
057     * Method createAssociationFeaturesAssociation.
058     * 
059     * @param associationFeatures
060     */
061    public void createAssociationFeaturesAssociation( AssociationFeatures associationFeatures )
062    {
063        if ( this.parent != null )
064        {
065            breakAssociationFeaturesAssociation( this.parent );
066        }
067
068        this.parent = associationFeatures;
069    } //-- void createAssociationFeaturesAssociation( AssociationFeatures )
070
071    /**
072     * Get the parent field.
073     * 
074     * @return AssociationFeatures
075     */
076    public AssociationFeatures getParent()
077    {
078        return this.parent;
079    } //-- AssociationFeatures getParent()
080
081    /**
082     * Set the parent field.
083     * 
084     * @param parent
085     */
086    public void setParent( AssociationFeatures parent )
087    {
088        if ( this.parent != null )
089        {
090            this.parent.breakBidiInListAssociation( this );
091        }
092
093        this.parent = parent;
094
095        if ( parent != null )
096        {
097            this.parent.createBidiInListAssociation( this );
098        }
099    } //-- void setParent( AssociationFeatures )
100
101}