Inner Java Enum as value class in EntityModeler
Inner Java Enum as value class in EntityModeler
- Subject: Inner Java Enum as value class in EntityModeler
- From: Riccardo De Menna <email@hidden>
- Date: Sat, 7 Nov 2009 01:03:10 -0800
Hi,
This issue was already discussed once but I can't really find if it
was fixed somehow and I'm missing the obvious.
I'm trying more and more to force myself to use Java Enums whenever
possible (instead of static fields) and often I find myself in need to
serialize them to db for storage.
So I write nice to/from PLIST/BLOB factory and conversion methods to
dump my Enums into whatever storage I'm using. This unfortunately
requires me to fill in Entity Modeler's 'Value Class' field using an
inner class (actually it's an inner Enum).
I can't use the Class.InnerClass notation. It only works with the Class
$InnerClass notation. The problem is that the template then will also
pickup the $ thing and wrongly write bugged templates that I have to
manually fix.
It's only a matter of searching all the '$' and replacing them with a
'.', but it can be tedious when you are tweaking the model often.
Is there a way to use an inner class without having to manually patch
the generated templates?
rdm
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden