Hi Michael,
I haven't ever used Dozer so I can't comment on if this is actually
possible in Dozer without changing your schema as you've mentioned.
The Dozer website does mention its possible to have a primitive to
Primitve Wrapper with some configuration. I'm sure there mailing lists
might know the details better than I, but its looks like it might be
pretty simple (http://dozer.sourceforge.net/documentation/mappings.html)

I don't think there is a way to make XmlBeans generate an Integer as
BigInteger is the preferred type
(http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html).
Would using xs:integer be an acceptable solution for you?

Hope this helps,
-Jacob Danner



On 7/18/07, Michael Mattox <[EMAIL PROTECTED]> wrote:
Hello,

I have a question about xmlbeans with Dozer.  We're having a problem
with optional attributes.  We have an integer that we specify in our
xsd as min and max occurs as 1 and nillable="true".  When we generate
our java classes with xmlbeans, we expect to have an attribute of type
Integer.  Instead of we have int and then a method isXSet.  This isn't
so bad, it's better to call isXSet rather than check for null, using
int is less painful than Integer, and the default value of zero is not
bad (better than null pointer).

However, this doesn't work with Dozer.  Dozer doesn't know about the
isXSet methods and therefore the value is always zero, even if it was
unset.

Has anyone had this problem?   Is it possible to configure xmlbeans to
create an Integer so that it'd work with Dozer?  Is there something to
configure with Dozer so that it knows about the isXSet methods??

Thanks,
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to