Feature Requests item #1063859, was opened at 2004-11-10 16:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536548&aid=1063859&group_id=73047
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Ingo M�ller (xalapa)
Assigned to: Nobody/Anonymous (nobody)
Summary: problem with the method 'handleGetIdentifiers(boolean)'
Initial Comment:
problem with the method 'handleGetIdentifiers(boolean)'
in the package
org.andromda.metafacades.uml14.EntityFacadeLogicImpl
The method is always using the first generalization
from the entity, because it is calling the method
'getGeneralization'.
And this method gives always the first entry of the
collection back.
We have the following sample:
class Entity extends ClassExtends implements
ClassImplements {...}
In the Implementation of the method
'handleGetIdentifiers(boolean)' you can see the
following code fragment:
for (ClassifierFacade superClass =
(ClassifierFacade)getGeneralization()
; superClass != null && identifiers.isEmpty()
&& follow
; superClass =
(ClassifierFacade)superClass.getGeneralization())
{
if
(superClass.hasStereotype(UMLProfile.STEREOTYPE_ENTITY))
{
EntityFacade entity =
(EntityFacade)superClass;
identifiers.addAll(entity.getIdentifiers(follow));
}
}
return identifiers;
but one option can be:
Collection generalizations = getGeneralizations();
if (generalizations == null) {
return identifiers;
}
Iterator it = generalizations.iterator();
while (it.hasNext()) {
GeneralizationFacade generalizationEntity =
(GeneralizationFacade)it.next();
for (ClassifierFacade superClass =
(ClassifierFacade)generalizationEntity.getParent()
; superClass != null && identifiers.isEmpty() &&
follow
; superClass =
(ClassifierFacade)superClass.getGeneralization()) {
if
(superClass.hasStereotype(UMLProfile.STEREOTYPE_ENTITY))
{
EntityFacade entityFacade =
(EntityFacade)superClass;
identifiers.addAll(entityFacade.getIdentifiers(follow));
}
}
}
return identifiers;
I''m not secure if I understood the problem correct.
But with the orginal implementation we can't find our
declaration of the primary key!
It would be nice to give me a feedback
Thanks
Ingo
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536548&aid=1063859&group_id=73047
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel