Type: New Feature
Resolution: Won't Fix
Affects Version/s: Version 2.1
Fix Version/s: None
For getters/setters which take/return fundamental types (e.g. long) user would like to generate the Wrapper types (e.g. java.lang.Long). See mail below.
> From: Ramona Krickan email@example.com
> Sent: Friday, April 07, 2006 2:01 AM
> To: firstname.lastname@example.org
> Subject: AW: Wrapper classes instead of primitive types in the Generated
> Hello Lawrence,
> thank you very much for your help. It helped me understand the basic
> - why you are using XmlLong and the other classes.
> But what I didn't really understand is why you don't use java.lang.Long
> convenience, but the primitive type long.
> My Problem is the following:
> I am working with ibatis (ORM-Tool). For this tool I write xml-mapping
> files, so called sql-maps, where I specify a class with its properties.
> So when I query my Database, ibatis looks at this mapping file and then
> searches for the specified class. When it found the class it creates an
> instance and fills in the propertys with the help of the getter and setter
> The problem is that the ORM-Tools work with the Wrapper classes because
> there a null is possible. If for example a database identifier has null as
> its value, the ORM-Tool knows that it still has to save this Object to the
> database, if the value is not null, but for example 0, then the ORM-Tool
> thinks that the Object is already persistent.
> Because there are so many classes we just need once, we want to have them
> generated from XmlBeans.
> Because of this Problem, neither the primitive type nor the Xml... classes
> work for us.
> To solve this problem for us, I have changed the source code a bit, but
> isn't a really code solution because with each new release from XmlBeans,
> have to adjust the code again.
> A nice solution for this specific problem we found with JAXB. There you
> specify user definded type within annotations. Is there a plan to
> this feature in XmlBeans? Or is there anything that speaks against it? If
> there is nothing that speaks against it, I would like to implement the
> Standard of specifying user defined types in XmlBeans, but for doing that
> need help.
> I hope I could clearly state my problem and you can help me.