Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [argouml-users] Multiplicity Questions

argouml
Discussion topic

Back to topic list

Re: [argouml-users] Multiplicity Questions

Author linus
Full name Linus Tolke
Date 2012-03-27 21:54:05 PDT
Message Hello Mark!

I think you should point out that this is a Java generation question.
Because we completely separate implementations for each language this kind
of thing might work differently for C++, C#., PHP and SQL.

For Java, ideally the generation would create different code depending on
the multiplicity and you would want to control the array/vector/list-type
used when realizing links with multiplicity bigger than 1. I think it is
now fixed to a Vector that is probably not a good choice in most cases
since generics were introduced as you point out.

When I test to set the association end to visibility private I notice that
it changes to private. Please check this again!

I am not sure where it would be natural to have a Map generated. I guess it
would be for association classes or associations with three or more ends
but I don't think that is supported in the code generation.

As a developer of ArgoUML you are most welcome to make the improvements you
suggest here. It is a much-needed addition.

        /Linus



2012/3/27 Mark Fortner <phidias51 at gmail dot com>

> 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
>
Attachments

« Previous message in topic | 2 of 9 | Next message in topic »

Messages

Show all messages in topic

[argouml-users] Multiplicity Questions phidias Mark Fortner 2012-03-27 14:04:24 PDT
     Re: [argouml-users] Multiplicity Questions linus Linus Tolke 2012-03-27 21:54:05 PDT
     Re: [argouml-users] Multiplicity Questions bobtarling Bob Tarling 2012-03-27 23:37:18 PDT
         Re: [argouml-users] Multiplicity Questions phidias Mark Fortner 2012-03-28 08:07:00 PDT
             Re: [argouml-users] Multiplicity Questions tfmorris Tom Morris 2012-03-28 08:32:54 PDT
                 Re: [argouml-users] Multiplicity Questions phidias Mark Fortner 2012-03-28 09:33:12 PDT
                     Re: [argouml-users] Multiplicity Questions phidias Mark Fortner 2012-03-29 08:11:23 PDT
                         Re: [argouml-users] Multiplicity Questions phidias Mark Fortner 2012-04-04 07:32:59 PDT
                             [argouml-dev] Re: [argouml-users] Multiplicity Questions bobtarling Bob Tarling 2012-04-04 09:54:33 PDT
Messages per page: