#**#// search multilink $token.MultiLink
#**##parse("java/default:storyPattern/link/import2.vm" )
#**##set( $list = "${sourceName}.get$targetRoleName ()" )
#**##set( $multiLink = $token.MultiLink )
#**##if ( $token.Type == 0 )## NEXT
#*   *##set( $multiName = $multiLink.SourceObject.ObjectName )
#*   *##if ( $multiLink.Type == 2 )## DIRECT
#*      *##set( $mparam = "${list}.indexOf ($multiName) + 1" )
#*      *##set( $multi = "NextOf" )
#*   *##elseif ( $multiLink.Type == 3 )## INDEX
#*      *##set( $mparam = "${list}.indexOf ($multiName) + $multiLink.Index" )
#*      *##set( $multi = "NextOf" )
#*   *##elseif ( $multiLink.Type == 4 )## INDIRECT
#*      *##set( $mparam = "${list}.indexOf ($multiName)" )
#*   *##end
#**##elseif ( $token.Type == 1 )## PREVIOUS
#*   *##set( $multiName = $multiLink.TargetObject.ObjectName )
#*   *##if ( $multiLink.Type == 2 )## DIRECT
#*      *##set( $mparam = "${list}.indexOf ($multiName) - 1" )
#*      *##set( $multi = "PreviousOf" )
#*   *##elseif ( $multiLink.Type == 3 )## INDEX
#*      *##set( $mparam = "${list}.indexOf ($multiName) - $multiLink.Index" )
#*      *##set( $multi = "PreviousOf" )
#*   *##elseif ( $multiLink.Type == 4 )## INDIRECT
#*      *##set( $upperbound = $multiName )
#*   *##end	
#**##end
#**##if( !$upperbound )
#*   *##parse("java/emf:storyPattern/link/indexCheck.vm" )
#**##end
#**##if( $toOne || $multi )
#*   *##parse("$!{style}storyPattern/link/toOne.vm" )
#**##else
#*   *##parse("$!{style}storyPattern/link/toMany.vm" )
#**##end