# -*- perl -*-
# DO NOT EDIT - This file is generated by UMMF; http://ummf.sourceforge.net 
# From template: $Id: PerlTemplate.txt,v 1.74 2004/08/01 03:50:07 kstephens Exp $

package UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet;

#use 5.6.1;
use strict;
use warnings;

#################################################################
# Version
#

our $VERSION = do { my @r = (q{1.0} =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r };


#################################################################
# Documentation
#

=head1 NAME

UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet -- 

=head1 VERSION

1.0

=head1 SYNOPSIS

=head1 DESCRIPTION 

=head1 USAGE

=head1 EXPORT

=head1 METATYPE

L<UMMF::UML::MetaModel::Foundation::Core::Class|UMMF::UML::MetaModel::Foundation::Core::Class>

=head1 SUPERCLASSES

L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>




=head1 ATTRIBUTES

I<NO ATTRIBUTES>


=head1 ASSOCIATIONS


=head2 C<0..*> : C<collaborationInstanceSet_Collaboration> E<lt>---E<gt>  C<collaboration> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration C<0..1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<collaborationInstanceSet_ModelElement> E<lt>---E<gt>  C<constrainingElement> : UMMF::UML::MetaModel::Foundation::Core::ModelElement C<0..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<1> : C<context> E<lt>---E<gt>  C<interactionInstance> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet C<0..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<collaborationInstanceSet_Instance> E<lt>---E<gt>  C<particpatingInstance> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance C<1..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance>

=item multiplicity = C<1..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<collaborationInstanceSet_Link> E<lt>---E<gt>  C<particpatingLink> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link C<0..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back



=head1 METHODS

=cut



#################################################################
# Dependencies
#





use Carp qw(croak confess);
use Set::Object 1.05;
use Class::Multimethods 1.70;
use Data::Dumper;
use Scalar::Util qw(weaken);
use UMMF::UML::MetaModel::__ObjectBase qw(:__ummf_array);


#################################################################
# Generalizations
#

use base qw(
  UMMF::UML::MetaModel::Foundation::Core::ModelElement



);


#################################################################
# Exports
#

our @EXPORT_OK = qw(
);
our %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );





#################################################################
# Validation
#


=head2 C<__validate_type>

  UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet->__validate_type($value);

Returns true if C<$value> is a valid representation of L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet>.

=cut
sub __validate_type($$)
{
  my ($self, $x) = @_;

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet->__typecheck($value, $msg);

Calls C<confess()> with C<$msg> if C<<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet->__validate_type($value)>> is false.

=cut
sub __typecheck
{
  my ($self, $x, $msg) = @_;

  confess("typecheck: $msg: type '" . 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet' . ": value '$x'")
    unless __validate_type($self, $x);
}


=head2 C<isaCollaborationInstanceSet>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet>.
Other receivers will return false.

=cut
sub isaCollaborationInstanceSet { 1 }


=head2 C<isaBehavioral_Elements__Collaborations__CollaborationInstanceSet>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet>.
Other receivers will return false.
This is the fully qualified version of the C<isaCollaborationInstanceSet> method.

=cut
sub isaBehavioral_Elements__Collaborations__CollaborationInstanceSet { 1 }


#################################################################
# Introspection
#

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

Returns the UML Model name (C<'Behavioral_Elements::Collaborations::CollaborationInstanceSet'>) for an object or package of
this Classifier.

=cut
sub __model_name { 'Behavioral_Elements::Collaborations::CollaborationInstanceSet' }



=head2 C<__isAbstract>

  $package->__isAbstract;

Returns C<0>.

=cut
sub __isAbstract { 0; }


my $__tangram_schema;
=head2 C<__tangram_schema>

  my $tangram_schema $obj_or_package->__tangram_schema

Returns a HASH ref that describes this Classifier for Tangram.

See L<UMMF::UML::Export::Perl::Tangram|UMMF::UML::Export::Perl::Tangram>

=cut
sub __tangram_schema
{
  my ($self) = @_;

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet' =>
     {
       'table' => 'Behavioral_Elements__Collaborations__CollaborationInstanceSet',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'collaboration'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration',

                  'null' => '1', 

                                    'col' => 'collaboration', 

                                                                                                                   }
      ,
                  	 	       'constrainingElement'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Foundation::Core::ModelElement',

                           'table' => 'CollaborationInstanceSet_ConstrainingElement', 

                                                      'item' => 'constrainingElement', 

                  'coll' => 'collaborationInstanceSet_ModelElement',

                                                                               }
      ,
                  	 	       'interactionInstance'
       => {
	 'type_impl' => 'iset',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet',

                           'table' => 'Behavioral_Elements__Collaborations__CollaborationInstanceSet__interactionInstance', 

                                                               'coll' => 'context',

                                             'aggreg' => '1', 

                                           }
      ,
                  	 	       'particpatingInstance'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance',

                           'table' => 'Behavioral_Elements__CollaborationInstanceSet_ParticpatingInstance', 

                                                      'item' => 'particpatingInstance', 

                  'coll' => 'collaborationInstanceSet_Instance',

                                                                               }
      ,
                  	 	       'particpatingLink'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link',

                           'table' => 'Behavioral_Elements__CollaborationInstanceSet_ParticpatingLink', 

                                                      'item' => 'particpatingLink', 

                  'coll' => 'collaborationInstanceSet_Link',

                                                                               }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::Foundation::Core::ModelElement',  ],
       'sql' => {

       },
     },
   ],

   'sql' =>
   {
    # Note Tangram::Ref::get_exporter() has
    # "UPDATE $table SET $self->{col} = $refid WHERE id = $id",
    # The id_col is hard-coded, 
    # Thus id_col will not work.
    #'id_col' => '__sid',
    #'class_col' => '__stype',
   },
     # 'set_id' => sub { }
     # 'get_id' => sub { }

      
  };
}


#################################################################
# Class Attributes
#


    

#################################################################
# Class Associations
#


    

#################################################################
# Initialization
#


=head2 C<___initialize>

Initialize all Attributes and AssociationEnds in a instance of this Classifier.
Does B<not> initalize slots in its Generalizations.

See also: C<__initialize>.

=cut
sub ___initialize
{
  my ($self) = @_;

  # Attributes



  # Associations

  # AssociationEnd 
  #  collaborationInstanceSet_Collaboration 0..*
  #  <--> 
  #  collaboration 0..1 UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.
    if ( defined $self->{'collaboration'} ) {
    my $x = $self->{'collaboration'};
    $self->{'collaboration'} = undef;
    $self->set_collaboration($x);
  }
  
  # AssociationEnd 
  #  collaborationInstanceSet_ModelElement 0..*
  #  <--> 
  #  constrainingElement 0..* UMMF::UML::MetaModel::Foundation::Core::ModelElement.
    if ( defined $self->{'constrainingElement'} ) {
    my $x = $self->{'constrainingElement'};
        $self->{'constrainingElement'} = Set::Object->new();
        $self->set_constrainingElement(@$x);
  }
  
  # AssociationEnd 
  #  context 1
  #  <--> 
  #  interactionInstance 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet.
    if ( defined $self->{'interactionInstance'} ) {
    my $x = $self->{'interactionInstance'};
        $self->{'interactionInstance'} = Set::Object->new();
        $self->set_interactionInstance(@$x);
  }
  
  # AssociationEnd 
  #  collaborationInstanceSet_Instance 0..*
  #  <--> 
  #  particpatingInstance 1..* UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance.
    if ( defined $self->{'particpatingInstance'} ) {
    my $x = $self->{'particpatingInstance'};
        $self->{'particpatingInstance'} = Set::Object->new();
        $self->set_particpatingInstance(@$x);
  }
  
  # AssociationEnd 
  #  collaborationInstanceSet_Link 0..*
  #  <--> 
  #  particpatingLink 0..* UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link.
    if ( defined $self->{'particpatingLink'} ) {
    my $x = $self->{'particpatingLink'};
        $self->{'particpatingLink'} = Set::Object->new();
        $self->set_particpatingLink(@$x);
  }
  

  $self;
}


my $__initialize_use;

=head2 C<__initialize>

Initialize all slots in this Classifier and all its Generalizations.

See also: C<___initialize>.

=cut
sub __initialize
{
  my ($self) = @_;

  # $DB::single = 1;

  unless ( ! $__initialize_use ) {
    $__initialize_use = 1;
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::Element');
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::ModelElement');
  }

  $self->UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___initialize;

  $self;
}
      

=head2 C<__create>

Calls all <<create>> Methods for this Classifier and all Generalizations.

See also: C<___create>.

=cut
sub __create
{
  my ($self, @args) = @_;

  # $DB::single = 1;
  $self->UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet::___create(@args);
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___create();

  $self;
}




#################################################################
# Attributes
#




#################################################################
# Association
#


=for html <hr/>

=cut

#################################################################
# AssociationEnd collaborationInstanceSet_Collaboration <---> collaboration
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration
# multiplicity = 0..1
# ordering = 

=head2 C<collaboration>

  my $val = $obj->collaboration;

Returns the AssociationEnd C<collaboration> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>.

=cut
sub collaboration ($)
{
  my ($self) = @_;
		  
  $self->{'collaboration'};
}


=head2 C<set_collaboration>

  $obj->set_collaboration($val);

Sets the AssociationEnd C<collaboration> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>.
Returns C<$obj>.

=cut
sub set_collaboration ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'collaboration'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.collaboration") }

    # Recursion lock
        $self->{'collaboration'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_Collaboration($self) if $old;
    $val->add_collaborationInstanceSet_Collaboration($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_collaboration>

  $obj->add_collaboration($val);

Adds the AssociationEnd C<collaboration> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_collaboration ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'collaboration'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.collaboration");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet::collaboration: too many")
    # if defined $self->{'collaboration'};

    # Recursion lock
        $self->{'collaboration'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_Collaboration($self) if $old;
    $val->add_collaborationInstanceSet_Collaboration($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_collaboration>

  $obj->remove_collaboration($val);

Removes the AssociationEnd C<collaboration> value C<$val>.
Returns C<$obj>.

=cut
sub remove_collaboration ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'collaboration'}) eq $val ) { # Recursion lock
    $val = $self->{'collaboration'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_Collaboration($self) if $old;
    $val->add_collaborationInstanceSet_Collaboration($self)    if $val;

  
  }
}


=head2 C<clear_collaboration>

  $obj->clear_collaboration;

Clears the AssociationEnd C<collaboration> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>.
Returns C<$obj>.

=cut
sub clear_collaboration ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'collaboration'}) ) { # Recursion lock
    my $val = $self->{'collaboration'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_Collaboration($self) if $old;
    $val->add_collaborationInstanceSet_Collaboration($self)    if $val;

    }

  $self;
}


=head2 C<count_collaboration>

  $obj->count_collaboration;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration> associated with C<collaboration>.

=cut
sub count_collaboration ($)
{
  my ($self) = @_;

  my $x = $self->{'collaboration'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaborationInstanceSet_ModelElement <---> constrainingElement
# type = UMMF::UML::MetaModel::Foundation::Core::ModelElement
# multiplicity = 0..*
# ordering = 

=head2 C<constrainingElement>

  my @val = $obj->constrainingElement;
  my $ary_val = $obj->constrainingElement;

Returns the AssociationEnd C<constrainingElement> values of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub constrainingElement ($)
{
  my ($self) = @_;

    my $x = $self->{'constrainingElement'};

  # confess("Container for constrainingElement $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_constrainingElement>

  $obj->set_constrainingElement(@val);

Sets the AssociationEnd C<constrainingElement> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub set_constrainingElement ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_constrainingElement;
  $self->add_constrainingElement(@val);
}


=head2 C<add_constrainingElement>

  $obj->add_constrainingElement(@val);

Adds AssociationEnd C<constrainingElement> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub add_constrainingElement ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'constrainingElement'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.constrainingElement");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_ModelElement($self) if $old;
    $val->add_collaborationInstanceSet_ModelElement($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_constrainingElement>

  $obj->remove_constrainingElement(@val);

Removes the AssociationEnd C<constrainingElement> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub remove_constrainingElement ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'constrainingElement'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.constrainingElement");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_collaborationInstanceSet_ModelElement($self) if $old;
    $val->add_collaborationInstanceSet_ModelElement($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_constrainingElement>

  $obj->clear_constrainingElement;

Clears the AssociationEnd C<constrainingElement> links to L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub clear_constrainingElement ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'constrainingElement'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'constrainingElement'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_collaborationInstanceSet_ModelElement($self) if $old;
    $val->add_collaborationInstanceSet_ModelElement($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_constrainingElement>

  $obj->count_constrainingElement;

Returns the number of elements associated with C<constrainingElement>.

=cut
sub count_constrainingElement ($)
{
  my ($self) = @_;

  my $x = $self->{'constrainingElement'};

    defined $x ? $x->size : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd context <---> interactionInstance
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet
# multiplicity = 0..*
# ordering = 

=head2 C<interactionInstance>

  my @val = $obj->interactionInstance;
  my $ary_val = $obj->interactionInstance;

Returns the AssociationEnd C<interactionInstance> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub interactionInstance ($)
{
  my ($self) = @_;

    my $x = $self->{'interactionInstance'};

  # confess("Container for interactionInstance $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_interactionInstance>

  $obj->set_interactionInstance(@val);

Sets the AssociationEnd C<interactionInstance> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet>.
Returns C<$obj>.

=cut
sub set_interactionInstance ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_interactionInstance;
  $self->add_interactionInstance(@val);
}


=head2 C<add_interactionInstance>

  $obj->add_interactionInstance(@val);

Adds AssociationEnd C<interactionInstance> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet>.
Returns C<$obj>.

=cut
sub add_interactionInstance ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'interactionInstance'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.interactionInstance");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_context($self) if $old;
    $val->add_context($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_interactionInstance>

  $obj->remove_interactionInstance(@val);

Removes the AssociationEnd C<interactionInstance> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet>.
Returns C<$obj>.

=cut
sub remove_interactionInstance ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'interactionInstance'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.interactionInstance");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_context($self) if $old;
    $val->add_context($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_interactionInstance>

  $obj->clear_interactionInstance;

Clears the AssociationEnd C<interactionInstance> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::InteractionInstanceSet>.
Returns C<$obj>.

=cut
sub clear_interactionInstance ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'interactionInstance'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'interactionInstance'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_context($self) if $old;
    $val->add_context($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_interactionInstance>

  $obj->count_interactionInstance;

Returns the number of elements associated with C<interactionInstance>.

=cut
sub count_interactionInstance ($)
{
  my ($self) = @_;

  my $x = $self->{'interactionInstance'};

    defined $x ? $x->size : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaborationInstanceSet_Instance <---> particpatingInstance
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance
# multiplicity = 1..*
# ordering = 

=head2 C<particpatingInstance>

  my @val = $obj->particpatingInstance;
  my $ary_val = $obj->particpatingInstance;

Returns the AssociationEnd C<particpatingInstance> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub particpatingInstance ($)
{
  my ($self) = @_;

    my $x = $self->{'particpatingInstance'};

  # confess("Container for particpatingInstance $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_particpatingInstance>

  $obj->set_particpatingInstance(@val);

Sets the AssociationEnd C<particpatingInstance> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance>.
Returns C<$obj>.

=cut
sub set_particpatingInstance ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_particpatingInstance;
  $self->add_particpatingInstance(@val);
}


=head2 C<add_particpatingInstance>

  $obj->add_particpatingInstance(@val);

Adds AssociationEnd C<particpatingInstance> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance>.
Returns C<$obj>.

=cut
sub add_particpatingInstance ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'particpatingInstance'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.particpatingInstance");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_Instance($self) if $old;
    $val->add_collaborationInstanceSet_Instance($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_particpatingInstance>

  $obj->remove_particpatingInstance(@val);

Removes the AssociationEnd C<particpatingInstance> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance>.
Returns C<$obj>.

=cut
sub remove_particpatingInstance ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'particpatingInstance'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.particpatingInstance");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_collaborationInstanceSet_Instance($self) if $old;
    $val->add_collaborationInstanceSet_Instance($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_particpatingInstance>

  $obj->clear_particpatingInstance;

Clears the AssociationEnd C<particpatingInstance> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Instance>.
Returns C<$obj>.

=cut
sub clear_particpatingInstance ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'particpatingInstance'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'particpatingInstance'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_collaborationInstanceSet_Instance($self) if $old;
    $val->add_collaborationInstanceSet_Instance($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_particpatingInstance>

  $obj->count_particpatingInstance;

Returns the number of elements associated with C<particpatingInstance>.

=cut
sub count_particpatingInstance ($)
{
  my ($self) = @_;

  my $x = $self->{'particpatingInstance'};

    defined $x ? $x->size : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaborationInstanceSet_Link <---> particpatingLink
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link
# multiplicity = 0..*
# ordering = 

=head2 C<particpatingLink>

  my @val = $obj->particpatingLink;
  my $ary_val = $obj->particpatingLink;

Returns the AssociationEnd C<particpatingLink> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub particpatingLink ($)
{
  my ($self) = @_;

    my $x = $self->{'particpatingLink'};

  # confess("Container for particpatingLink $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_particpatingLink>

  $obj->set_particpatingLink(@val);

Sets the AssociationEnd C<particpatingLink> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link>.
Returns C<$obj>.

=cut
sub set_particpatingLink ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_particpatingLink;
  $self->add_particpatingLink(@val);
}


=head2 C<add_particpatingLink>

  $obj->add_particpatingLink(@val);

Adds AssociationEnd C<particpatingLink> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link>.
Returns C<$obj>.

=cut
sub add_particpatingLink ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'particpatingLink'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.particpatingLink");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_collaborationInstanceSet_Link($self) if $old;
    $val->add_collaborationInstanceSet_Link($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_particpatingLink>

  $obj->remove_particpatingLink(@val);

Removes the AssociationEnd C<particpatingLink> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link>.
Returns C<$obj>.

=cut
sub remove_particpatingLink ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'particpatingLink'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.particpatingLink");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_collaborationInstanceSet_Link($self) if $old;
    $val->add_collaborationInstanceSet_Link($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_particpatingLink>

  $obj->clear_particpatingLink;

Clears the AssociationEnd C<particpatingLink> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Link>.
Returns C<$obj>.

=cut
sub clear_particpatingLink ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'particpatingLink'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'particpatingLink'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_collaborationInstanceSet_Link($self) if $old;
    $val->add_collaborationInstanceSet_Link($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_particpatingLink>

  $obj->count_particpatingLink;

Returns the number of elements associated with C<particpatingLink>.

=cut
sub count_particpatingLink ($)
{
  my ($self) = @_;

  my $x = $self->{'particpatingLink'};

    defined $x ? $x->size : 0;
  }







# End of Class CollaborationInstanceSet


=pod

=for html <hr/>

I<END OF DOCUMENT>

=cut

############################################################################

1; # is true!

############################################################################

### Keep these comments at end of file: kstephens@users.sourceforge.net 2003/04/06 ###
### Local Variables: ###
### mode:perl ###
### perl-indent-level:2 ###
### perl-continued-statement-offset:0 ###
### perl-brace-offset:0 ###
### perl-label-offset:0 ###
### End: ###

