IBM WebSphere Application ServerTM
Release 7

com.ibm.bpc.clientcore
Class DataObjectUtils

java.lang.Object
  extended by com.ibm.bpc.clientcore.DataObjectUtils

public class DataObjectUtils
extends java.lang.Object

Provides utilities that facilitate working with DataObjects.


Field Summary
static java.lang.String COPYRIGHT
           
 
Constructor Summary
DataObjectUtils()
           
 
Method Summary
static java.util.Map getValueMap(commonj.sdo.DataObject dataObject)
          Provides a modifiable map representation of the DataObject.
static commonj.sdo.DataObject populateAll(commonj.sdo.DataObject dataObject, java.util.Map valueMap)
          Sets values in the value map on the DataObject.
static commonj.sdo.DataObject populateAll(commonj.sdo.DataObject dataObject, java.util.Map valueMap, boolean setDefaultsForMandatoryFields)
          Sets values in the value map on the DataObject.
static commonj.sdo.DataObject putAll(commonj.sdo.DataObject dataObject, java.util.Map valueMap)
          Sets values in the value map on the DataObject.
static commonj.sdo.DataObject putAll(commonj.sdo.DataObject dataObject, java.util.Map valueMap, boolean setDefaultsForMandatoryFields)
          Sets values in the value map on the DataObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

DataObjectUtils

public DataObjectUtils()
Method Detail

getValueMap

public static java.util.Map getValueMap(commonj.sdo.DataObject dataObject)
Provides a modifiable map representation of the DataObject. The keys in the map are Xpath expressions of all the leaf properties in the DataObject. The values in the map are the Java objects stored in the DataObject. A leaf property is a property that is a simple type with no properties. Wildcard elements and elements for choices are not supported.

Returns:
map A map representation of the DataObject

putAll

public static commonj.sdo.DataObject putAll(commonj.sdo.DataObject dataObject,
                                            java.util.Map valueMap)
Sets values in the value map on the DataObject. The keys of the value map must be Xpath expressions of the leaf properties that are to be modified. The associated values are the values that are set. Wildcard elements and elements for choices are not supported. Default values for mandatory fields will be set if necessary.

Parameters:
dataObject - The DataObject that is to be modified
valueMap - A map representation of the DataObject
Returns:
The modified DataObject

putAll

public static commonj.sdo.DataObject putAll(commonj.sdo.DataObject dataObject,
                                            java.util.Map valueMap,
                                            boolean setDefaultsForMandatoryFields)
Sets values in the value map on the DataObject. The keys of the value map must be Xpath expressions of the leaf properties that are to be modified. The associated values are the values that are set. Wildcard elements and elements for choices are not supported. If setDefaultsForMandatoryFields is true, default values for mandatory fields will be set if necessary.

Parameters:
dataObject -
valueMap -
setDefaultsForMandatoryFields -
Returns:
The modified DataObject

populateAll

public static commonj.sdo.DataObject populateAll(commonj.sdo.DataObject dataObject,
                                                 java.util.Map valueMap)
                                          throws com.ibm.bpe.jsf.exception.PropertyNotFoundException,
                                                 com.ibm.bpe.jsf.exception.PropertyPopulationException
Sets values in the value map on the DataObject. The keys of the value map must be Xpath expressions of the leaf properties that are to be modified. The associated values are the values that are set. Wildcard elements and elements for choices are not supported. In contrast to putAll, this method throws an exception if a key could not be processed or other exceptions occurred. It is recommended to catch all ProcessExceptions. Default values for mandatory fields will be set if necessary.

Parameters:
dataObject - The DataObject that is to be modified
valueMap - A map representation of the DataObject
Returns:
The modified DataObject.
Throws:
com.ibm.bpe.jsf.exception.PropertyPopulationException
com.ibm.bpe.jsf.exception.PropertyNotFoundException

populateAll

public static commonj.sdo.DataObject populateAll(commonj.sdo.DataObject dataObject,
                                                 java.util.Map valueMap,
                                                 boolean setDefaultsForMandatoryFields)
                                          throws com.ibm.bpe.jsf.exception.PropertyNotFoundException,
                                                 com.ibm.bpe.jsf.exception.PropertyPopulationException
Sets values in the value map on the DataObject. The keys of the value map must be Xpath expressions of the leaf properties that are to be modified. The associated values are the values that are set. Wildcard elements and elements for choices are not supported. In contrast to putAll, this method throws an exception if a key could not be processed or other exceptions occurred. It is recommended to catch all ProcessExceptions. If setDefaultsForMandatoryFields is true, default values for mandatory fields will be set if necessary.

Parameters:
dataObject - The DataObject that is to be modified
valueMap - A map representation of the DataObject
setDefaultsForMandatoryFields -
Returns:
The modified DataObject.
Throws:
com.ibm.bpe.jsf.exception.PropertyPopulationException
com.ibm.bpe.jsf.exception.PropertyNotFoundException

IBM WebSphere Application ServerTM
Release 7