#**##set( $postfix = "$mofutility.upFirstChar($sourceName)To$mofutility.upFirstChar($targetName)" )
#**##set( $iter = "fujaba__Iter$postfix" )
#**##set( $localVars = $engine.getFromInformation("localVars") )
#**##set( $return = $localVars.addLocalVariable($targetName, $target.InstanceOf, $target) )
#**##set( $return = $localVars.addLocalVariable($iter, "Iterator", $link) )
#**##set( $children = $mofutility.indent("      ",$!children) )
#**#
#**#// search qualified
#**#
#**##if ( $targetSet )
#*   *#	#set( $return = $imports.addToImports("de.upb.tools.fca.*") )
#*   *#	#set( $return = $localVars.addLocalVariable($collectionName, "FHashSet", $link) )
#*   *#	$collectionName = new FHashSet ();
#**##else
#*   *#	fujaba__Success = false;
#**##end
#**#
#**### [fk] don't need to cast to MOFLONAssociation. This would result in a runtime error (ClassCastException),
#**### instead of a compile time error, if the assoc is no MOFLON association. Instead give a warning in the
#**### user interface, if qualified associations are used without using the MOFLON interfaces. 
#**###$iter = ((org.moflon.api.MOFLONAssociation)${getQualifiedAssoc}"${getXparameter}")).refQualifiedQuery("$queryEndName", $sourceName, $valueOfQualifier).iterator();
#**#$iter = ${getX1}"${getXparameter}")).refQualifiedQuery("$queryEndName", $sourceName, $valueOfQualifier).iterator();
#**#
#**#while ( #if(!$forEach && !$targetSet || $targetNegative)!(fujaba__Success) && #end${iter}.hasNext())
#**#{
#**#  try{
#**#	
#**#	$targetName = (${fullJavaNameOfTargetType}) ${iter}.next();
#**#	
#**#	#if ( !$optional )
#*   *#		#parse( "jmi/default:storyPattern/object/bound.vm" )
#**#	#end
#**#
#**#	$!children
#**#	#if ( $targetSet )
#*   *#		${collectionName}.add ($targetName);
#**#	#else
#*   *#		fujaba__Success = true;
#**#	#end
#**#  }
#**#  catch(JavaSDMException fujaba__InternalException){
#**#	fujaba__Success = false;
#**#  }
#**#}
#**##if ( $targetOptional )
#*   *#	if (!fujaba__Success)
#*   *#	{
#*   *#		fujaba__Success = true;
#*   *#		$targetName = null;
#*   *#	}
#**##elseif ( !$targetSet )
#*   *#	JavaSDM.ensure (fujaba__Success);
#**##end
#**#
#**#
