You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Ihab EL-ALAMI <el...@intalio.com> on 2008/02/21 03:57:31 UTC
Int/ Integer java types for xs:int schema type
Hi,
How can I generate the Java type Interger for xs:int? Of course, by default,
it generates int.
The problem with int is that you can not put it to null, and my application
needs this possibility.
Thanks in advance for your help
--
Ihab
Re: Int/ Integer java types for xs:int schema type
Posted by Ihab EL-ALAMI <el...@intalio.com>.
Jacob,
Here is a part of the schema:
<xsd:element name="deadline" type="xsd:dateTime" maxOccurs="1"
minOccurs="0"/>
<xsd:element name="priority" type="xsd:int"
nillable="true"/>
using the attribute nillable or not does not change the type of the
generated Java type : it is always int.
Is it normal? or should it generate Integer?
By the way, I have just found a workaround for my problem, using the
XMLBeans types, but I am still interested to know the answer to this
question.
Thanks for your help
On 2/21/08, Jacob Danner <ja...@gmail.com> wrote:
>
> Can you post a snippet of the schema part in question?
> -jacobd
>
>
> On Wed, Feb 20, 2008 at 7:38 PM, Ihab EL-ALAMI <el...@intalio.com>
> wrote:
> > Thanks Jacob for your quick and precise answer,
> > I tried what you saif by adding nillable="true" to the schema, but that
> did
> > not change anything. The java type is still int.
> > Any other ideas?
> > Thanks again
> >
> >
> >
> > On 2/20/08, Jacob Danner <ja...@gmail.com> wrote:
> > >
> > >
> > >
> > > Hi Ihab,
> > > Take a peek at
> > >
> >
> http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html
> > > otherwise you will need to declare teh type with nillable=true, etc.
> > > HTH,
> > > -jacobd
> > >
> > >
> > > On Wed, Feb 20, 2008 at 6:57 PM, Ihab EL-ALAMI <el...@intalio.com>
> > wrote:
> > > > Hi,
> > > > How can I generate the Java type Interger for xs:int? Of course, by
> > default,
> > > > it generates int.
> > > >
> > > > The problem with int is that you can not put it to null, and my
> > application
> > > > needs this possibility.
> > > >
> > > > Thanks in advance for your help
> > > >
> > > > --
> > > > Ihab
> > >
> > >
> > >
> > >
> > > --
> > > I'm competing in a Half-Ironman distance triathlon to raise money for
> > > the fight against cancer!
> > > Please help support my efforts by going to:
> > > http://www.active.com/donate/tntwaak/jacobd
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> > > For additional commands, e-mail: user-help@xmlbeans.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Ihab
>
>
>
>
> --
>
> I'm competing in a Half-Ironman distance triathlon to raise money for
> the fight against cancer!
> Please help support my efforts by going to:
> http://www.active.com/donate/tntwaak/jacobd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
--
Ihab
Re: Int/ Integer java types for xs:int schema type
Posted by Jacob Danner <ja...@gmail.com>.
Can you post a snippet of the schema part in question?
-jacobd
On Wed, Feb 20, 2008 at 7:38 PM, Ihab EL-ALAMI <el...@intalio.com> wrote:
> Thanks Jacob for your quick and precise answer,
> I tried what you saif by adding nillable="true" to the schema, but that did
> not change anything. The java type is still int.
> Any other ideas?
> Thanks again
>
>
>
> On 2/20/08, Jacob Danner <ja...@gmail.com> wrote:
> >
> >
> >
> > Hi Ihab,
> > Take a peek at
> >
> http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html
> > otherwise you will need to declare teh type with nillable=true, etc.
> > HTH,
> > -jacobd
> >
> >
> > On Wed, Feb 20, 2008 at 6:57 PM, Ihab EL-ALAMI <el...@intalio.com>
> wrote:
> > > Hi,
> > > How can I generate the Java type Interger for xs:int? Of course, by
> default,
> > > it generates int.
> > >
> > > The problem with int is that you can not put it to null, and my
> application
> > > needs this possibility.
> > >
> > > Thanks in advance for your help
> > >
> > > --
> > > Ihab
> >
> >
> >
> >
> > --
> > I'm competing in a Half-Ironman distance triathlon to raise money for
> > the fight against cancer!
> > Please help support my efforts by going to:
> > http://www.active.com/donate/tntwaak/jacobd
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
> >
> >
>
>
>
> --
> Ihab
--
I'm competing in a Half-Ironman distance triathlon to raise money for
the fight against cancer!
Please help support my efforts by going to:
http://www.active.com/donate/tntwaak/jacobd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Int/ Integer java types for xs:int schema type
Posted by Ihab EL-ALAMI <el...@intalio.com>.
Thanks Jacob for your quick and precise answer,
I tried what you saif by adding nillable="true" to the schema, but that did
not change anything. The java type is still int.
Any other ideas?
Thanks again
On 2/20/08, Jacob Danner <ja...@gmail.com> wrote:
>
> Hi Ihab,
> Take a peek at
>
> http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html
> otherwise you will need to declare teh type with nillable=true, etc.
> HTH,
> -jacobd
>
>
> On Wed, Feb 20, 2008 at 6:57 PM, Ihab EL-ALAMI <el...@intalio.com>
> wrote:
> > Hi,
> > How can I generate the Java type Interger for xs:int? Of course, by
> default,
> > it generates int.
> >
> > The problem with int is that you can not put it to null, and my
> application
> > needs this possibility.
> >
> > Thanks in advance for your help
> >
> > --
> > Ihab
>
>
>
>
> --
> I'm competing in a Half-Ironman distance triathlon to raise money for
> the fight against cancer!
> Please help support my efforts by going to:
> http://www.active.com/donate/tntwaak/jacobd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
--
Ihab
Re: Int/ Integer java types for xs:int schema type
Posted by Jacob Danner <ja...@gmail.com>.
Hi Ihab,
Take a peek at
http://xmlbeans.apache.org/docs/2.0.0/guide/conXMLBeansSupportBuiltInSchemaTypes.html
otherwise you will need to declare teh type with nillable=true, etc.
HTH,
-jacobd
On Wed, Feb 20, 2008 at 6:57 PM, Ihab EL-ALAMI <el...@intalio.com> wrote:
> Hi,
> How can I generate the Java type Interger for xs:int? Of course, by default,
> it generates int.
>
> The problem with int is that you can not put it to null, and my application
> needs this possibility.
>
> Thanks in advance for your help
>
> --
> Ihab
--
I'm competing in a Half-Ironman distance triathlon to raise money for
the fight against cancer!
Please help support my efforts by going to:
http://www.active.com/donate/tntwaak/jacobd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org