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.dsmediator.client
Interface DataService

All Known Subinterfaces:
  StreamingDataService

public interface DataService

This class is the service interface for a data service.

Example:
`DataService ds = DataServiceFactory.newDataService(ctx,"Demo_Application","ld:customerproj/customerView");
ds.invoke("getCustomerBySSN", new Object[] { "303-04-5643" });
`

Method Summary
`boolean` | `clearResultCache(java.lang.String function, int arity)` Purge result cache for the function on this Data Service with this name and arity.
`commonj.sdo.DataObject` | `createRootDataObject()` Create a new DataGraph based on the XML type associated with the Data Service.
`com.bea.xml.XmlObject[]` | `invoke(java.lang.String function, java.lang.Object[] args)` The dynamic method for invoking data service functions.
`com.bea.xml.XmlObject[]` | `invoke(java.lang.String function, java.lang.Object[] args, RequestConfig config)` The dynamic method for invoking data service functions.
`java.lang.Object[]` | `invokeProcedure(java.lang.String procedure, java.lang.Object[] args)` The dynamic method for invoking data service functions marked as having side-effects, aka Procedures.
`java.lang.Object[]` | `invokeProcedure(java.lang.String procedure, java.lang.Object[] args, RequestConfig config)` The dynamic method for invoking data service functions marked as having side-effects, aka Procedures.
`java.util.Properties` | `submit(commonj.sdo.DataObject dataObject)` Submits data object changes for updates to back-end systems.
`java.util.Properties[]` | `submit(commonj.sdo.DataObject[] dataObject)` Submits array of data object changes for updates to source systems.

Method Detail

### submit

    public java.util.Properties submit(commonj.sdo.DataObject dataObject)
                                throws SDOMediatorException

  Submits data object changes for updates to back-end systems.

  Parameters:
    `dataObject` - The data object to be submitted.
  Returns:
    The primary keys for inserted SDO objects as name-value pairs.
  Throws:
    `SDOMediatorException`

### submit

    public java.util.Properties[] submit(commonj.sdo.DataObject[] dataObject)
                                  throws SDOMediatorException

  Submits array of data object changes for updates to source systems.

  Parameters:
    `dataObject` - The data object to be submitted.
  Returns:
    The primary keys for inserted SDO objects as name-value pairs.
  Throws:
    `SDOMediatorException`

### invoke

    public com.bea.xml.XmlObject[] invoke(java.lang.String function,
                                          java.lang.Object[] args)
                                   throws SDOMediatorException

  The dynamic method for invoking data service functions.

  Parameters:
    `function` - The name of the function in the data service to be invoked.
    `args` - The arguments to the function. For non-argument functions, use null.
  Returns:
    The result of function execution as an XmlObject[] - one XmlObject per top-level element in the result of the function execution. This array will never be null; if the function produces empty results, a zero-element array will be returned.
  Throws:
    `SDOMediatorException`

### invoke

    public com.bea.xml.XmlObject[] invoke(java.lang.String function,
                                          java.lang.Object[] args,
                                          RequestConfig config)
                                   throws SDOMediatorException

  The dynamic method for invoking data service functions.

  Parameters:
    `function` - The name of the function in the data service to be invoked.
    `args` - The arguments to the function. For non-argument functions, use null.
    `config` - A RequestConfig for controlling how the server will invoke this function, and for allowing return of out-of-band results such as server audit information.
  Returns:
    The result of function execution as an XmlObject[] - one XmlObject per top-level element in the result of the function execution. This function will return null only if the RequestConfig option `RequestConfig.OUTPUT_FILENAME` or `RequestConfig.COMPILE_ONLY` is specified, otherwise a non-null array will be returned. If the function produces empty results, a zero-element array will be returned.
  Throws:
    `SDOMediatorException`

### invokeProcedure

    public java.lang.Object[] invokeProcedure(java.lang.String procedure,
                                              java.lang.Object[] args)
                                       throws SDOMediatorException

  The dynamic method for invoking data service functions marked as having side-effects, aka Procedures. As procedures can return complex or primitive types, the returned value of this method will be an Object[]. Each Object in this array will be either:
  - a single Java primitive value, eg. BigInteger or String, for atomic values.
  - an XmlObject, for complex return types.

  Parameters:
    `procedure` - The name of the procedure in the data service to be invoked.
    `args` - The arguments to the procedure. For non-argument functions, use null.
  Returns:
    The result of procedure execution as an Object[], as described above. This array will never be null; if the function produces empty results, a zero-element array will be returned.
  Throws:
    `SDOMediatorException`

### invokeProcedure

    public java.lang.Object[] invokeProcedure(java.lang.String procedure,
                                              java.lang.Object[] args,
                                              RequestConfig config)
                                       throws SDOMediatorException

  The dynamic method for invoking data service functions marked as having side-effects, aka Procedures. As procedures can return complex or primitive types, the returned value of this method will be an Object[]. Each Object in this array will be either:
  - a single Java primitive value, eg. BigInteger or String, for atomic values.
  - an XmlObject, for complex return types.

  Parameters:
    `procedure` - The name of the procedure in the data service to be invoked.
    `args` - The arguments to the procedure. For non-argument functions, use null.
    `config` - A RequestConfig for controlling how the server will invoke this function, and for allowing return of out-of-band results such as server audit information.
  Returns:
    The result of function execution as an Object[] as described above. This array will be null only if the RequestConfig option `RequestConfig.OUTPUT_FILENAME` or `RequestConfig.COMPILE_ONLY` is specified, otherwise a non-null array will be returned. If the function produces empty results, a zero-element array will be returned.
  Throws:
    `SDOMediatorException`

### createRootDataObject

    public commonj.sdo.DataObject createRootDataObject()
                                                throws SDOMediatorException

  Create a new DataGraph based on the XML type associated with the Data Service.

  Returns:
    The root DataObject from the data graph.
  Throws:
    `SDOMediatorException`

### clearResultCache

    public boolean clearResultCache(java.lang.String function,
                                    int arity)
                             throws SDOMediatorException

  Purge result cache for the function on this Data Service with this name and arity.

  Parameters:
    `function` - Function name.
    `arity` - Arity (# args) of function.
  Returns:
    true if cache was cleared successfully.
  Throws:
    `SDOMediatorException`

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

Copyright © 2006 BEA Systems Inc. All Rights Reserved.