I am trying to use an enumartion class (class with Enumeration stereotype) with
its attributes being numbers. I tried giving these number literals Integer type
and then tried String Type but in both cases I get the following error during
code generation:
CONTENTTYPE_TYPE_TC.java:57: <identifier> expected
public static final CONTENTTYPE_TYPE_TC 10 = new CONTENTTYPE_TYPE_TC("10");
^
CONTENTTYPE_TYPE_TC.java:62: <identifier> expected
public static final CONTENTTYPE_TYPE_TC 56 = new CONTENTTYPE_TYPE_TC("56");
.... and so on.
What I understand from this is that an numbers can't be used as identifiers.
The whole purpose of what I am trying to do is to create LOOKUP TYPE CODES for
which I am using enumeration here.
I would appreciate if someone can point me to the right way to do this:
_ is using enumeration classes with the attributes being numbers (with Integer
or String types) is teh right way to do this?
_ My application has a need for lookup tables of type codes where mostly there
are two columns, a type_code and a description. Most of teh times I won't even
use description columns and just use the type-codes. Other than using an
enumeration class what else can I use?
Your help is greatly appreciated.
Regards
Safaa
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3247#3247
Posting to http://forum.andromda.org/ is preferred over posting to the mailing
list!
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user