Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Advanced Features : Setting Data to NULL Explicitly

Setting Data to NULL Explicitly
Custom adapters can set attribute values in MInstance, MAssocList and MOperationRequest, and in MOperationReply (C++) or MOperation (Java) explicitly to NULL using a setNullData() method. Explicitly setting an attribute to NULL is different from not setting the attribute at all.
Before retrieving an attribute, a custom adapter can verify whether the attribute was set to NULL explicitly by calling isNullData().
The following table illustrates what get() and isNullData() return depending on how data was set.
MData value
set value calling setNullData()
To understand data in the SDK context, it is useful to consider both the format in which data is encapsulated and the format in which it is sent and received.
There are two primary data formats:
An MInstance allows hierarchical data representation and depends on a predefined class description (metadata information). This metadata information is provided in the adapter configuration and then encapsulated in a number of classes by the MApp application manager.
An MTree is a data structure that can be sent over a network. An MTree represents data as a hierarchical tree in which each node contains one or more name-value pairs.
In SDK versions earlier than 5.x, custom adapters explicitly serialized an MInstance to get an MTree. In SDK 5.x, a publisher serializes an MInstance when you send it. A subscriber has to deserialize the MTree.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved