commonj.connector.runtime
Interface DataBinding

All Superinterfaces:
Serializable
All Known Subinterfaces:
FaultDataBinding, RecordDataBinding, RecordHolderDataBinding

public interface DataBinding
extends Serializable

The data binding represents the mapping between a native data format and a common user application visible format, and vice-versa. Represents the application view of the conversion only and requires an implementation with the adapter view to perform the actual conversion, for example the implementation class that also implements RecordHolderDataBinding interface.

If the databinding and functionSelector are the same class then the runtime should use the same instance on the inbound invocation.

Since:
1.0
See Also:
RecordHolderDataBinding

Method Summary
 DataObject getDataObject()
          Get the data.
 void setDataObject(DataObject dataObject)
          Set the data.
 

Method Detail

getDataObject

DataObject getDataObject()
                         throws DataBindingException
Get the data. The returned data object represents the data in the common application visible format, the Service Data Object (SDO). It is an application view of the data returned from the DataBinding.

Return null only if there is no data object present. In case of error the method must throw DataBindingException

Returns:
The data object in the format understood by the application.
Throws:
DataBindingException - if an error occured during execution. The cause may contain the original exception.

setDataObject

void setDataObject(DataObject dataObject)
                   throws DataBindingException
Set the data. The argument data object represents the data in the common application visible format, the Service Data Object (SDO). It is an application view of the data passed to the DataBinding.

The argument can be null

Parameters:
dataObject - An object in the format understood by the application.
Throws:
DataBindingException - if an error occured during execution. The cause may contain the original exception.