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

## com.bea.ld.dsmediator.client
Interface DataService

public interface DataService

This class is the service interface for a data service.

Example:
`DataService ds = DataServiceFactory.newDataService(ctx,"Demo_Application","ld:myxds/Xds");
xds.invoke("getFunction()",arg);
`

Method Summary
`com.bea.xml.XmlObject` | `invoke(java.lang.String method, java.lang.Object[] args)` The dynamic method for invoking data service functions.
`void` | `setFilterCondition(FilterXQuery filterXQuery)` Sets a filtering condition to be applied to the results of data service function execution.
`void` | `setQueryAttributes(QueryAttributes qattributes)` Sets the query attributes.
`void` | `setSortCriteria(java.lang.String appliesTo, java.lang.String field, java.lang.String sort)` Sets a sorting criteria on the results of data service function execution.
`java.util.Properties[]` | `submit(commonj.sdo.DataObject dataObject)` Submits data object changes for updates to back-end systems.
`void` | `writeOutputToFile(java.lang.String method, java.lang.Object[] args, java.lang.String fileName)` Writes the results of method invocation to the specified file.

Method Detail

### setFilterCondition

    public void setFilterCondition(FilterXQuery filterXQuery)

  Sets a filtering condition to be applied to the results of data service function execution. Filters will be applied to any of the objects in the hierarchy of the field path, e.g., either to CUSTOMER or ORDER if the field is CUSTOMER/ORDER/TOTAL_ORDER_AMOUNT

  Parameters:
    `filterXQuery` - The filter XQuery expression

### setSortCriteria

    public void setSortCriteria(java.lang.String appliesTo,
                                java.lang.String field,
                                java.lang.String sort)
                         throws java.lang.Exception

  Sets a sorting criteria on the results of data service function execution.

  Parameters:
    `appliesTo` - - String XPath relative to document element.
    `field` - - String fieldName (relative (not the full path) to 'appliesTo' object).
    `sort` - - sort criteria (ascending/descending).
  Throws:
    java.lang.Exception -

### setQueryAttributes

    public void setQueryAttributes(QueryAttributes qattributes)

  Sets the query attributes.

  Parameters:
    `qattributes` - The query attributes

### submit

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

  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:
    java.lang.Exception -

### invoke

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

  The dynamic method for invoking data service functions. For non-argument functions pass `null`

  Parameters:
    `method` - The name of the method in the data service to be invoked.
    `args` - The arguments to the method. For non-argument functions, use null.
  Returns:
    Result The result of function execution as an XML Object.
  Throws:
    SDOMediatorException -

### writeOutputToFile

    public void writeOutputToFile(java.lang.String method,
                                  java.lang.Object[] args,
                                  java.lang.String fileName)
                           throws StreamingException

  Writes the results of method invocation to the specified file. The base of the file will be domain root. Specify a filename on the server into which the serialized result are written. This filename must make sense to the server process (it will be passed directly to a FileWriter). This filename must be in an existing directory on the server; the server will not attempt to create the output directory.
  This method can be used by a remote client.

  Parameters:
    `method` - The data service method to be invoked.
    `args` - The arguments to the function.
    `fileName` - The file name.

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

Copyright © 2005 Bea Systems Inc. All Rights Reserved.