my dog learned polymorphism
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Enumeration in assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Enumeration in assignment" Watch "Enumeration in assignment" New topic

Enumeration in assignment

Ranganathan Kaliyur Mannar

Joined: Oct 16, 2003
Posts: 1101

Has anyone had Enums in their design. I believe UML supports enums through stereotypes...
for example, I would like to create an enum Result (PASS, FAIL) and have it in my entity...with JPA supporting enums, its cool to have it...
but, has anyone had any specific issues with this?

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

I did put an enum in my class diagram. It wasn't a JPA one so I just used a sterotype called <<enum>> to show what it was.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Dmitri Ericsson
Ranch Hand

Joined: Feb 16, 2010
Posts: 109
I think that there is no need to go in such detail as the actual impementation of types. I've used some fields with type meaning, by I did'nt mentioned how they are realized (enums, constants etc

SCEA 5, SCJP 6 My SCEA Experience
Ranganathan Kaliyur Mannar

Joined: Oct 16, 2003
Posts: 1101

ok, yeah...just a curiosity...I like them and use them frequently...
Also, Argo UML has a separate component for that (ends up having a <<enum>> stereotype)
I agree. Here's the link:
subject: Enumeration in assignment
It's not a secret anymore!