Apama Documentation : Release Notes : What's New in Apama 5.0 : New Apama client API support for decimal type
New Apama client API support for decimal type
With release 5.0 the Apama Client Software Developement Kits for Java and .NET now have classes to represent the decimal field type.
Apama Client SDK for Java
A new class, DecimalFieldValue has been added to represent the Decimal Field Type. This will always represent the decimal value within a BigDecimal where possible, and is retrievable with calls to getValue(). Also within the class is a float representation of the value. In cases where it is not possible to represent the value as a BigDecimal, for example, if it is a NaN value, the value of the BigDecimal will be null, the float value will then be relevant and can be retrieved by getFloatValue(). There is also a string representation stored of the original value, which can be retrieved from the method getStringValue(). The toString of this class will stringify the BigDecimal value whenever it is not null, otherwise it will stringify the float representation. There are also helper methods available such as isNaN() and isInfinity().
See the Apama Javadoc listing for com.apama.event.parser for complete information about these classes. The Apama Javadoc documentation is available at <apama_install_dir>\doc\javadoc\index.html.
Apama .NET Client SDK
A new class, DecimalFieldValue has been added to represent the Decimal Field Type. This will always represent the decimal value within a Dot Net Decimal where possible, and is retrievable with calls to the property Value. Also within the class is a float representation of the value. In cases where it is not possible to represent the value as a Dot Net Decimal, for example, if it is a NaN value, the value of the Dot Net Decimal will be null, the float value will then be relevant and can be retrieved by the property FloatValue. There is also a string representation stored of the original value, which can be retrieved from the property StringValue. The ToString of this class will stringify the Dot Net Decimal value whenever it is not null, otherwise it will stringify the float representation. There are also helper properties available such as IsNaN and IsInfinity.
See the Apama .NET documentation for Apama.Event.Parser Namespace for complete information about these classes. The Apama .NET documentation is available at <apama_install_dir>\doc\dotNet\engine_client_dotnet5.0.chm.
Apama C/C++ Client SDK
Because there is no built-in support for the decimal type in C and C++, decimal values passed back over the Apama C event parser API are encoded as 64-bit binary integer decimals, as described in IEEE 754-2008. For Apama applications that need precise decimal manipulation, Apama recommends you use a third-party library, such as the freely available Intel Decimal FP library.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback