|
Oracle® Database XML Java API Reference 12c Release 1 (12.1) E15981-09 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface OXQConnection
Extensions to javax.xml.xquery.XQConnection.
Use method OXQView.getConnection(XQConnection) to access these extensions. For example:
OXQDataSource ds = new OXQDataSource(); XQConnection con = ds.getConnection(); OXQConnection ocon = OXQView.getConnection(con); ...
| Field Summary | |
|---|---|
static int |
SCOPE_CONNECTIONIdentifies components associated with the connection instance |
static int |
SCOPE_EXPRESSIONIdentifies components associated with the expression instance |
| Method Summary | ||
|---|---|---|
XQItem |
convertXQueryToXQueryX(OXQEntity query)Converts XQuery to XQueryX. |
|
void |
convertXQueryXToXQuery(OXQEntity query, java.io.OutputStream out, java.lang.String outEncoding)Converts XQueryX to XQuery. |
|
XQPreparedExpression |
copyExpression(XQPreparedExpression prepExpr)Returns a copy of an XQPreparedExpression instance. |
|
|
createEntityResolverFactory(java.lang.Class<T> factoryType)Returns a factory for creating instances of OXQEntityResolver. |
|
OXQOptions |
createOptions()Creates an empty instance of OXQOptions. |
|
OXQSerializationParameters |
createSerializationParameters()Creates an instance of OXQSerializationParameters. |
|
OXQEntityLoader |
getEntityLoader(int scope)Returns an OXQEntityLoader instance that controls the schema/module loading process. |
|
OXQEntityResolver |
getEntityResolver()Gets the entity resolver. |
|
XQStaticContext |
getModuleStaticContext()Gets an XQStaticContext instance representing the default values for all properties of library modules loaded by this connection. |
|
XQConnection |
getXQView()Returns the XQConnection instance corresponding to this instance. |
|
XQPreparedExpression |
prepareExpression(OXQEntity xquery)Prepares an expression for execution. |
|
XQPreparedExpression |
prepareExpression(OXQEntity xquery, XQStaticContext properties)Prepares an expression for execution. |
|
void |
setEntityResolver(OXQEntityResolver entityResolver)Assigns a new entity resolver to the connection, replacing the existing one. |
|
void |
setModuleStaticContext(XQStaticContext properties)Sets the default values for all properties of library modules loaded by this connection. |
|
| Field Detail |
|---|
static final int SCOPE_CONNECTION
getEntityLoader(int), Constant Field Valuesstatic final int SCOPE_EXPRESSION
getEntityLoader(int), Constant Field Values| Method Detail |
|---|
XQConnection getXQView()
XQConnection instance corresponding to this instance.getXQView in interface OXQDataFactory
XQPreparedExpression prepareExpression(OXQEntity xquery)
throws XQException
The properties of the connection's default XQStaticContext instance are copied to the returned expression.
xquery - the XQuery expression as an OXQEntity. The permitted entity data is the same as what is permitted for MODULE entities except that collections are not allowed. Cannot be null.XQException - if (1) the connection is in a closed state, (2) there are errors preparing the expression, or (3) the xquery parameter is null
XQPreparedExpression prepareExpression(OXQEntity xquery,
XQStaticContext properties)
throws XQException
The properties of the specified XQStaticContext instance are copied to the returned expression.
xquery - the XQuery expression as an OXQEntity. The permitted entity data is the same as what is permitted for MODULE entities except that collections are not allowed. Cannot be null.properties - XQStaticContext containing values of expression properties.XQException - if (1) the connection is in a closed state, or (2) the specified argument is null
XQPreparedExpression copyExpression(XQPreparedExpression prepExpr)
throws XQException
XQPreparedExpression instance. Users can create an initial prepared expression using the XQConnection interface, and then make multiple copies using this method. The copying is done without plan recompilation, and each copy can then be executed concurrently in a separate thread. The copies do not support all the methods of OXQPreparedExpression. The copies are primarily intended for binding variables and execution.prepExpr - The input prepared expressionXQException - if (1) the input prepared expression is closed, (2) the input prepared expression has already been executed or has bound variables (3) the input prepared expression was generated by some other XQJ implementation (4) the input prepared expression cannot be copied or (5) there was an internal engine error while copying the input prepared expression
XQStaticContext getModuleStaticContext()
throws XQException
XQStaticContext instance representing the default values for all properties of library modules loaded by this connection. In order to modify the defaults, it is not sufficient to modify the values in the returned XQStaticContext instance; in addition method setModuleStaticContext(XQStaticContext) should be called to make the new values effective.XQStaticContext instance representing the default values for all properties of library modulesXQException - if the connection is in a closed state
void setModuleStaticContext(XQStaticContext properties)
throws XQException
XQStaticContext instance and update its private copy. The OXQEntityResolver implementation can override these defaults by providing OXQStaticContext instance along with the returned library module content. See OXQEntity.PROPERTY_MODULE_STATIC_CONTEXT for more information.properties - a XQStaticContext instance containing values of library module propertiesXQException - if the connection is in a closed state
<T extends OXQEntityResolverFactory> T createEntityResolverFactory(java.lang.Class<T> factoryType)
throws XQException
factoryType - The OXQEntityResolverFactory implementation class to constructXQException - if (1) the connection is in a closed state, (2) factory cannot be create for given factoryTypeOXQEntityResolverFactory
void setEntityResolver(OXQEntityResolver entityResolver)
throws XQException
entityResolver - the entity resolverXQException - if the connection is in a closed state
OXQEntityResolver getEntityResolver()
throws XQException
XQException - if the connection is in a closed state
OXQEntityLoader getEntityLoader(int scope)
throws XQException
The following entity loader instances are provided by each XQConnection:
OXQDataSource.IMPORT_SHARING modeOXQEntityLoader documentation for more information.scope - SCOPE_CONNECTION or SCOPE_EXPRESSIONXQException - if the connection is in a closed state
XQItem convertXQueryToXQueryX(OXQEntity query)
throws XQException
query - an OXQEntity instance representing the queryXQItem instance.XQException - if (1) the connection is closed, (2) a java IO exception was thrown while reading the query (attached as cause), or (3) the conversion failedOXQEntity.MEDIA_TYPE_XQUERY, OXQEntityKind.MODULE
void convertXQueryXToXQuery(OXQEntity query,
java.io.OutputStream out,
java.lang.String outEncoding)
throws XQException
query - an OXQEntity instance representing the query in XQueryXout - the output stream to which the resulting XQuery is writtenoutEncoding - a query encoding (UTF-8 if null)XQException - if (1) the connection is closed, (2) a java IO exception was thrown while reading the query (attached as cause), or (3) the conversion failedOXQEntity.MEDIA_TYPE_XQUERYX, OXQEntityKind.MODULE
OXQSerializationParameters createSerializationParameters()
throws XQException
OXQSerializationParameters.XQException - if the connection is in a closed state
OXQOptions createOptions()
throws XQException
OXQOptions.XQException - if the connection is in a closed state
|
Oracle® Database XML Java API Reference 12c Release 1 (12.1) E15981-09 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2003, 2014, Oracle and/or its affiliates. All rights reserved.