Re: Multiplicity Questions

Bob Tarling <[email protected]> Wed, 28 Mar 2012 07:37:16 +0100
Newsgroups gmane.comp.lang.uml.argouml.user
Message-ID <CAKWB3RS8j-_7nG3_SivqPDNaAUMOguyEPrFkWjs0z2iAGJ=FzQ@mail.gmail.com>
------=_Part_12703_948082796.1332916639379
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

All of these are relevant defects and change requesst. None of them can be
implemented in ArgoUML at the moment.

The change to define a generic List should be an improved standard
behaviour for an anything to many relationship. Maybe we could even
recognise some stereotype to use Set instead when relevant.

I think a close equivilent of MAP in UML is the qualifier value that can be
set an association-end. This should be an indication to the code generator
to create a Map instead. The qualifier would by the key for that map.

I think if you have set the multiplicity to 1 and our currently geting a
vector that should be raised as a defect.

Please raise defects, enhancements as appropriate.

As Linus says you are free to try to implement. Hopefully you will find
help on the dev list or maybe the subcomponent owner will come in to
implement.

Regards

Bob


On 27 March 2012 22:04, Mark Fortner <[email protected]> wrote:

> I've been trying to figure out how the changing multiplicity between
> classes, effects the code that gets generated.
>
> Let's say that you have a class like Department.  This class has multiple
> Employees.
>
> Department <>----- [1..*]Employee
>
>
> When I name the association to "employeeList", and add some
> documentation, and look at the source for the Department, I see this:
>
>   /**
>    *  A list of employees in the Department.
>    * @element-type Employee
>    */
>    public Vector employeeList
>
>
> Ideally, I'd like to see *private List<Employee> employeeList*.  At a
> minimum, is there anyway to display the generic type for the list?
>
> If I select the endpoint within Department, and set the visibility to
> Private, the code still shows up as public.
>
> Is there anyway of changing the type for an association?  For example,*MultiMap<Skill, Employee>
> *.
>
> Also, when I add something that has a multiplicity of 1, I still get a
> Vector.  Is there anyway of changing that?
>
> Regards,
>
> Mark
>

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=449&dsMessageId=2941496

To unsubscribe from this discussion, e-mail: [[email protected]].
------=_Part_12703_948082796.1332916639379
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

All of these are relevant defects and change requesst. None of them can be =
implemented in ArgoUML at the moment.<div><br></div><div>The change to defi=
ne a generic List should be an improved standard behaviour for an anything =
to many relationship. Maybe we could even recognise some stereotype to use =
Set instead when relevant.</div>
<div><br></div><div>I think a close equivilent of MAP in UML is the qualifi=
er value that can be set an association-end. This should be an indication t=
o the code generator to create a Map instead. The qualifier would by the ke=
y for that map.</div>
<div><br></div><div>I think if you have set the multiplicity to 1 and our c=
urrently geting a vector that should be raised as a defect.</div><div><br><=
/div><div>Please raise defects, enhancements as appropriate.</div><div>
<br></div><div>As Linus says you are free to try to implement. Hopefully yo=
u will find help on the dev list or maybe the subcomponent owner will come =
in to implement.</div><div><br></div><div>Regards</div><div><br></div><div>
Bob</div><div><br><br><div class=3D"gmail_quote">On 27 March 2012 22:04, Ma=
rk Fortner <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">phi=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I&#39;ve been trying to figure out how the changing multiplicity betwe=
en classes, effects the code that gets generated.</div><div><br></div>Let&#=
39;s say that you have a class like Department. =A0This class has multiple =
Employees.
<div><br></div><blockquote style=3D"margin:0 0 0 40px;border:none;padding:0=
px"><div>Department &lt;&gt;----- [1..*]Employee</div></blockquote><div><br=
></div><div>When I name the association to &quot;employeeList&quot;, and ad=
d some documentation,=A0and look at the source for the Department, I see th=
is:</div>

<div><br></div><blockquote style=3D"margin:0 0 0 40px;border:none;padding:0=
px"><div>=A0 /**=A0</div><div>=A0 =A0* =A0A list of employees in the Depart=
ment.</div><div>=A0 =A0* @element-type Employee</div><div>=A0 =A0*/</div><d=
iv>=A0 =A0public Vector employeeList</div>

</blockquote><div><br></div><div>Ideally, I&#39;d like to see <b>private Li=
st&lt;Employee&gt; employeeList</b>. =A0At a minimum, is there anyway to di=
splay the generic type for the list? =A0</div><div><br></div><div>If I sele=
ct the endpoint within Department, and set the visibility to Private, the c=
ode still shows up as public.</div>

<div><br></div><div>Is there anyway of changing the type for an association=
? =A0For example,<b> MultiMap&lt;Skill, Employee&gt;</b>.=A0</div><div><br>=
</div><div>Also, when I add something that has a multiplicity of 1, I still=
 get a Vector. =A0Is there anyway of changing that?</div>

<div><br></div><div>Regards,</div><div><br></div><div>Mark</div>
</blockquote></div><br></div>

------=_Part_12703_948082796.1332916639379--