Matthias,
What if Rahul provided custom implementations of the toString(),
valueOf() et alias methods. Could this be a possible way to go forward ?
Werner
Matthias Epheser wrote:
Hi,
as Werner mentioned, I created some changes concerning enum handling in
1.1.3-SNAPSHOT. But if I understand your problem correctly, you are not
using the java 5 enum as representation of a xs:simply type enumartion,
but as a "bean". This bean is implemented as a java5 enum and not a java
class.
So there are no good news from my side, even in 1.1.3-SNAPSHOT, only
support for xs:simply type enums and java5 is added. I will have a
deeper look into the mapping implementation, maybe I am overlooking
something and there is some trick that can be done with a mapping file.
You said that you cannot move to a snapshot release because of your
deploy in one month, so I think you will have to go with the workaround.
Maybe we can adopt the mapping mechanism to make this thing possible in
the future.
Regards
Matthias
Agarwal, Rahul schrieb:
The search function on the list doesn’t work I’m probably asking a
question that’s been asked before…
I am trying to Marshall a Java 5 enum that is multiple custom fields
like:
enum MyEnum{
VALUE1(“name”, “message”, “code”)
String getName…
String getMessage…
..
}
How do I write a Castor mapping file for this? I’m trying to write
<field name=”name”… > but it doesn’t work. I understand I cant
unmarshall which is fine, I just want to be able to marshall the enum
with its fields. Currently I’m only able to get it like
<myenum>VALUE1</mayenum>
Any help would be appreciated. (I know the workaround but I don’t want
to unnecessarily create a bean which will basically be the same as my
enum).
Thanks
Rahul
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email