Concept properties with numeric datatypes always returns zero in API catalog functions when not set.

Concept properties with numeric datatypes always returns zero in API catalog functions when not set.

book

Article ID: KB0086088

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Description:
While retrieving concept properties for an integer field, getPropertyValue always returns 0 instead of null even though the value is not set in the BE engine.
Symptoms:
Zero is returned instead of a null value.

Cause:
This is an expected behavior. (Java related). Numeric datatypes are primitive data types. In Java, values for numeric data types (int, long, double) cannot be null. This why the API catalog function returns "0" when the property value is not set. This will work in cases of string data types, meaning it will report null when the property value is not set.

Issue/Introduction

Concept properties with numeric datatypes always returns zero in API catalog functions when not set.

Resolution

XPath expression to validate if a numeric property value is null. Concept PropertyAtom has @isSet attribute for any validation.