Re: [Simple-support] Deserialization of type Calendar?
Brought to you by:
niallg
|
From: Timo R. <cr...@ol...> - 2008-10-01 14:52:39
|
Hello Niall, thanks for your quick reply. > If you change Calendar field to a GregorianCalendar field then it > should work fine. Currently it only supports this type of calendar. > I intend to expand this support the the other Calendar types soon > enough. I see that there is a transform for GregorianCalendar, but what I don't understand is, why Simple can't figure out itself that it should use the GregorianCalendar transform, because there is the class="java.util.GregorianCalendar" attribute on the time element in the XML code (furthermore, I can serialize it, but not deserialize it). Isn't this the same case as if I use the list interface, whereas the XML code will contain something like class="java.util.ArrayList" to denote the concrete instance type? My problem is, I have to serialize a lot of classes which all uses "Calendar" as the type and not the concrete "GregorianCalendar". Of course, all fields hold GregorianCalendar instances, but I can't change all those types at the moment :-/ Is the change from "Calendar" to "GregorianCalender" in all domain model classes really the only option I currently have? Thanks a lot for your help! Best regards, Timo Rumland |