com.bea.dsp.sdo
Class SDOUtil

java.lang.Object
  extended by com.bea.dsp.sdo.SDOUtil

public class SDOUtil
extends java.lang.Object

Includes certain helper methods for manipulating SDO DataObjects in the context of ALDSP.


Field Summary
protected static java.util.ResourceBundle captions
           
 
Method Summary
static commonj.sdo.DataObject disableChanges(commonj.sdo.DataObject obj)
          Given a DataObject, revert all the changes made to it and disable future change logging.
static void disableChanges(commonj.sdo.DataObject[] objs)
          Given an array of DataObjects, revert all the changes made and disable future change logging on each DataObject in the array.
static commonj.sdo.DataObject enableChanges(commonj.sdo.DataObject obj)
          Given a DataObject, enable change-logging on that DataObject.
static void enableChanges(commonj.sdo.DataObject[] objs)
          Given an array of DataObjects, enable change-logging on each DataObject in the array.
static void setElementName(commonj.sdo.DataObject obj, javax.xml.namespace.QName name)
          Given a DataObject which was created dynamically (eg., using DataFactory) and which represents an XML element, assign an XML element name to the DataObject.
static void setElementName(commonj.sdo.DataObject obj, java.lang.String namespace, java.lang.String localpart)
          Given a DataObject which was created dynamically (eg., using DataFactory) and which represents an XML element, assign an XML element name to the DataObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

captions

protected static final java.util.ResourceBundle captions
Method Detail

enableChanges

public static commonj.sdo.DataObject enableChanges(commonj.sdo.DataObject obj)
Given a DataObject, enable change-logging on that DataObject. It is necessary to call this method before making any changes to a DataObject that you intend to pass to a DSP operation argument of type changed-element(...).

Parameters:
obj - the DataObject to enable change-logging on.
Returns:
the same DataObject.
Throws:
java.lang.IllegalArgumentException - if obj is null.

enableChanges

public static void enableChanges(commonj.sdo.DataObject[] objs)
Given an array of DataObjects, enable change-logging on each DataObject in the array. It is necessary to call this method before making any changes to a DataObject that you intend to pass to a DSP operation argument of type changed-element(...).

Parameters:
objs - the DataObjects to enable change-logging on.
Throws:
java.lang.IllegalArgumentException - if objs is null

disableChanges

public static commonj.sdo.DataObject disableChanges(commonj.sdo.DataObject obj)
Given a DataObject, revert all the changes made to it and disable future change logging. Essentially, it reverts the DataObject to its state prior to calling enableChanges(DataObject). If enableChanges was not called on this object, then it is a no-op.

Parameters:
obj - the DataObject to disable change-logging on.
Returns:
the same DataObject.
Throws:
java.lang.IllegalArgumentException - if obj is null.

disableChanges

public static void disableChanges(commonj.sdo.DataObject[] objs)
Given an array of DataObjects, revert all the changes made and disable future change logging on each DataObject in the array. See disableChanges(DataObject).

Parameters:
objs - the DataObjects to disable change-logging on.
Throws:
java.lang.IllegalArgumentException - if objs is null.

setElementName

public static void setElementName(commonj.sdo.DataObject obj,
                                  javax.xml.namespace.QName name)
Given a DataObject which was created dynamically (eg., using DataFactory) and which represents an XML element, assign an XML element name to the DataObject. It is necessary to do this prior to passing the DataObject to any DSP operation or to enableChanges(DataObject).

Note: The element name must have been defined as a global element in some schema loaded into the HelperContext which was initially used to instantiate the DataObject.

Parameters:
obj - The DataObject.
name - QName of the XML element.
Throws:
java.lang.IllegalArgumentException - if the specified element name was not found as a global element name in any schema.

setElementName

public static void setElementName(commonj.sdo.DataObject obj,
                                  java.lang.String namespace,
                                  java.lang.String localpart)
Given a DataObject which was created dynamically (eg., using DataFactory) and which represents an XML element, assign an XML element name to the DataObject. It is necessary to do this prior to passing the DataObject to any DSP operation or to enableChanges(DataObject).

Note: The element name must have been defined as a global element in some schema loaded into the HelperContext which was initially used to instantiate the DataObject.

Parameters:
obj - The DataObject.
namespace - Namespace URI of the element QName.
localpart - Local part of the element QName.
Throws:
java.lang.IllegalArgumentException - if the specified element name was not found as a global element name in any schema.


Copyright © 2007 BEA Systems Inc. All Rights Reserved.