You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Madhawa Kasun Gunasekara <ma...@gmail.com> on 2015/06/16 16:03:25 UTC

[ODataV4](OLINGO) How to handle Float and Decimal in Odata

Hi Devs,

How can I use "Float" , "Decimal" primitive types in OData, olingo java v4.
What is the best approach to use those type of data in OData.
"Float" and "Decimal" Types are mentioned in the specification as well [1].

is it fine to convert those types in to Double ?

Any help on this matter is highly appreciated.


[1] http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.pdf

Thanks,
Madhawa

Re: [ODataV4](OLINGO) How to handle Float and Decimal in Odata

Posted by Madhawa Kasun Gunasekara <ma...@gmail.com>.
Hi Michael,

Thanks for the quick reply.

Regards,
Madhawa

Madhawa

On Wed, Jun 17, 2015 at 12:46 AM, Bolz, Michael <mi...@sap.com>
wrote:

> Hello Madhawa,
>
> Your use case is to define an Odata property as an Edm.Double and want to
> use this as a Java Double?
> If this is correct it is supported by Olingo.
>
> For detailed information you can take a look into the source code of the
> “org.apache.olingo.commons.core.edm.primitivetype.EdmDouble” implementation.
>
> Best regards,
> Michael
>
> From: Madhawa Kasun Gunasekara
> Reply-To: "user@olingo.apache.org"
> Date: Tuesday 16 June 2015 16:03
> To: "dev@olingo.apache.org", "user@olingo.apache.org"
> Subject: [ODataV4](OLINGO) How to handle Float and Decimal in Odata
>
> Hi Devs,
>
> How can I use "Float" , "Decimal" primitive types in OData, olingo java
> v4. What is the best approach to use those type of data in OData.
> "Float" and "Decimal" Types are mentioned in the specification as well [1].
>
> is it fine to convert those types in to Double ?
>
> Any help on this matter is highly appreciated.
>
>
> [1] http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.pdf
>
> Thanks,
> Madhawa
>

Re: [ODataV4](OLINGO) How to handle Float and Decimal in Odata

Posted by "Bolz, Michael" <mi...@sap.com>.
Hello Madhawa,

Your use case is to define an Odata property as an Edm.Double and want to use this as a Java Double?
If this is correct it is supported by Olingo.

For detailed information you can take a look into the source code of the “org.apache.olingo.commons.core.edm.primitivetype.EdmDouble” implementation.

Best regards,
Michael

From:  Madhawa Kasun Gunasekara
Reply-To:  "user@olingo.apache.org"
Date:  Tuesday 16 June 2015 16:03
To:  "dev@olingo.apache.org", "user@olingo.apache.org"
Subject:  [ODataV4](OLINGO) How to handle Float and Decimal in Odata

Hi Devs, 

How can I use "Float" , "Decimal" primitive types in OData, olingo java v4. What is the best approach to use those type of data in OData. 
"Float" and "Decimal" Types are mentioned in the specification as well [1].

is it fine to convert those types in to Double ? 

Any help on this matter is highly appreciated.


[1] http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part3-csdl.pdf

Thanks,
Madhawa