Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.dsp.sdo
Class SDOUtil

    java.lang.Object
      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 java.lang.String` | `serializeSource(javax.xml.transform.Source source)` Given a JAXP Source, serialize it to a String.
`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.
`static commonj.sdo.DataObject` | `toServerArg(commonj.sdo.DataObject dobj)` Given a DataObject, return the datagraph DataObject that wraps it if it was enabled for changes.
`static java.lang.String` | `toString(commonj.sdo.DataObject dobj)` Given a DataObject, return a String containing XML text representing that 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.

### toString

    public static java.lang.String toString(commonj.sdo.DataObject dobj)

  Given a DataObject, return a String containing XML text representing that DataObject.

  Exclude:

### toServerArg

    public static commonj.sdo.DataObject toServerArg(commonj.sdo.DataObject dobj)

  Given a DataObject, return the datagraph DataObject that wraps it if it was enabled for changes. If there is no datagraph, return the DataObject itself. Basically, this should be used when sending arguments to the server.

  Exclude:

### serializeSource

    public static java.lang.String serializeSource(javax.xml.transform.Source source)
                                            throws javax.xml.transform.TransformerException

  Given a JAXP Source, serialize it to a String. No, this has nothing to do with SDO; this was just a convenient place to hang this method.

  Throws:
    `javax.xml.transform.TransformerException`
  Exclude:

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 Oracle. All Rights Reserved.