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 PreparedExpression

All Known Subinterfaces:
  StreamingPreparedExpression

public interface PreparedExpression

This class is used to prepare and execute ad hoc queries. BEA recommends users have the Service Data Object library of the returned data form in the classpath; if this library is available, any XmlObjects returned will be DataObjects.

Example: `Context ctx = getContext(); PreparedExpression expr = DataServiceFactory.prepareExpression(ctx,"application_name", "declare variable $Name as xs:string external; import schema namespace t1=\"ld:Proj/MyDS\" at \"ld:Proj/schemas/MyDS.xsd\"; for $data in t1:func() where $data/first_name eq $Name return $data/child"); ); expr.bindString(new QName("Name"), "Jim"); XmlObject[] objs = expr.executeQuery();`

Method Summary
`void` | `bindBinary(javax.xml.namespace.QName qname, byte[] abyte0)` binds Binary DataType
`void` | `bindBinaryXML(javax.xml.namespace.QName qname, byte[] abyte0)` binds BinaryXML DataType
`void` | `bindBoolean(javax.xml.namespace.QName qname, boolean flag)` binds Boolean DataType
`void` | `bindByte(javax.xml.namespace.QName qname, byte byte0)` binds Byte DataType
`void` | `bindDate(javax.xml.namespace.QName qname, java.sql.Date date)` binds Date DataType
`void` | `bindDateTime(javax.xml.namespace.QName qname, java.util.Calendar calendar)` binds Calendar DataType
`void` | `bindDateTime(javax.xml.namespace.QName qname, java.util.Date date)` binds DateTime DataType
`void` | `bindDateTime(javax.xml.namespace.QName qname, java.sql.Timestamp timestamp)` binds DateTime DataType
`void` | `bindDecimal(javax.xml.namespace.QName qname, java.math.BigDecimal bigdecimal)` binds BigDecimal DataType
`void` | `bindDouble(javax.xml.namespace.QName qname, double d)` binds double DataType
`void` | `bindElement(javax.xml.namespace.QName qname, org.w3c.dom.Element element)` binds Element DataType
`void` | `bindElement(javax.xml.namespace.QName qname, java.lang.String s)` binds Object DataType
`void` | `bindFloat(javax.xml.namespace.QName qname, float f)` binds float DataType
`void` | `bindInt(javax.xml.namespace.QName qname, int i)` binds int DataType
`void` | `bindLong(javax.xml.namespace.QName qname, long l)` binds long DataType
`void` | `bindObject(javax.xml.namespace.QName qname, java.lang.Object obj)` binds Object DataType
`void` | `bindShort(javax.xml.namespace.QName qname, short word0)` binds short DataType
`void` | `bindString(javax.xml.namespace.QName qname, java.lang.String s)` binds String DataType
`void` | `bindTime(javax.xml.namespace.QName qname, java.sql.Time time)` binds Time DataType
`void` | `bindURI(javax.xml.namespace.QName qname, java.net.URI uri)` binds URI DataType
`java.lang.Object[]` | `executeQuery()` Executes the prepared query.
`java.lang.Object[]` | `executeQuery(RequestConfig config)` Executes the prepared query.

Method Detail

### executeQuery

    public java.lang.Object[] executeQuery()
                                    throws SDOMediatorException

  Executes the prepared query. As ad-hoc queries 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.

  Returns:
    The result of function execution as an Object[] as described above. This array will never be null; if the query produces empty results, a zero-element array will be returned.
  Throws:
    `SDOMediatorException`

### executeQuery

    public java.lang.Object[] executeQuery(RequestConfig config)
                                    throws SDOMediatorException

  Executes the prepared query. As ad-hoc queries 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:
    `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. Note: Filtering ad-hoc queries via FilterXQuery is meaningless, so any FilterXQuery on this RequestConfig will be ignored.
  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 query produces empty results, a zero-element array will be returned.
  Throws:
    `SDOMediatorException`

### bindBinary

    public void bindBinary(javax.xml.namespace.QName qname,
                           byte[] abyte0)

  binds Binary DataType

  Parameters:
    `qname` - The Qname
    `abyte0` - The Byte array

### bindBoolean

    public void bindBoolean(javax.xml.namespace.QName qname,
                            boolean flag)

  binds Boolean DataType

  Parameters:
    `qname` - The Qname
    `flag` - The Boolean value

### bindByte

    public void bindByte(javax.xml.namespace.QName qname,
                         byte byte0)

  binds Byte DataType

  Parameters:
    `qname` - The Qname
    `byte0` - The byte value

### bindDate

    public void bindDate(javax.xml.namespace.QName qname,
                         java.sql.Date date)

  binds Date DataType

  Parameters:
    `qname` - The Qname
    `date` - The Date value

### bindDateTime

    public void bindDateTime(javax.xml.namespace.QName qname,
                             java.util.Date date)

  binds DateTime DataType

  Parameters:
    `qname` - The Qname
    `date` - The Date value

### bindDateTime

    public void bindDateTime(javax.xml.namespace.QName qname,
                             java.sql.Timestamp timestamp)

  binds DateTime DataType

  Parameters:
    `qname` - The Qname
    `timestamp` - The Timestamp value

### bindDateTime

    public void bindDateTime(javax.xml.namespace.QName qname,
                             java.util.Calendar calendar)

  binds Calendar DataType

  Parameters:
    `qname` - The Qname
    `calendar` - The Calendar value

### bindDecimal

    public void bindDecimal(javax.xml.namespace.QName qname,
                            java.math.BigDecimal bigdecimal)

  binds BigDecimal DataType

  Parameters:
    `qname` - The Qname
    `bigdecimal` - The BigDecimal value

### bindDouble

    public void bindDouble(javax.xml.namespace.QName qname,
                           double d)

  binds double DataType

  Parameters:
    `qname` - The Qname
    `d` - The double value

### bindFloat

    public void bindFloat(javax.xml.namespace.QName qname,
                          float f)

  binds float DataType

  Parameters:
    `qname` - The Qname
    `f` - The float value

### bindInt

    public void bindInt(javax.xml.namespace.QName qname,
                        int i)

  binds int DataType

  Parameters:
    `qname` - The Qname
    `i` - The Integer value

### bindLong

    public void bindLong(javax.xml.namespace.QName qname,
                         long l)

  binds long DataType

  Parameters:
    `qname` - The Qname
    `l` - The long value

### bindShort

    public void bindShort(javax.xml.namespace.QName qname,
                          short word0)

  binds short DataType

  Parameters:
    `qname` - The Qname
    `word0` - The short value

### bindString

    public void bindString(javax.xml.namespace.QName qname,
                           java.lang.String s)

  binds String DataType

  Parameters:
    `qname` - The Qname
    `s` - The String value

### bindTime

    public void bindTime(javax.xml.namespace.QName qname,
                         java.sql.Time time)

  binds Time DataType

  Parameters:
    `qname` - The Qname
    `time` - The Time value

### bindURI

    public void bindURI(javax.xml.namespace.QName qname,
                        java.net.URI uri)

  binds URI DataType

  Parameters:
    `qname` - The Qname
    `uri` - The URI value

### bindObject

    public void bindObject(javax.xml.namespace.QName qname,
                           java.lang.Object obj)

  binds Object DataType

  Parameters:
    `qname` - The Qname
    `obj` - The Object value

### bindElement

    public void bindElement(javax.xml.namespace.QName qname,
                            java.lang.String s)

  binds Object DataType

  Parameters:
    `qname` - The Qname
    `s` - The Element value

### bindElement

    public void bindElement(javax.xml.namespace.QName qname,
                            org.w3c.dom.Element element)

  binds Element DataType

  Parameters:
    `qname` - The Qname
    `element` - The Element value

### bindBinaryXML

    public void bindBinaryXML(javax.xml.namespace.QName qname,
                              byte[] abyte0)

  binds BinaryXML DataType

  Parameters:
    `qname` - The Qname
    `abyte0` - The BinaryXML value

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.