|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ddtek.xquery3.xqj.DDXQDataSource
DDXQ implementation of XQDataSource.
| Field Summary | |
static String |
ALLOWJAVAFUNCTIONS
|
static String |
BASEURI
property names |
static String |
COLLATION
|
static String |
COLLECTIONURIRESOLVER
|
static String |
DOCUMENTURIRESOLVER
|
static String |
JDBCISOLATIONLEVEL
|
static String |
JDBCNAME
|
static String |
JDBCOPTIONS
|
static String |
JDBCSQLXMLFOREST
|
static String |
JDBCSQLXMLIDENTIER
|
static String |
JDBCTEMPTABLECOLUMNS
|
static String |
JDBCTEMPTABLESUFFIX
|
static String |
JDBCURL
|
static String |
MAXPOOLEDQUERIES
|
static String |
MODULEURIRESOLVER
|
static String |
MULTIVALUE_ADAPTERS
|
static String |
OPTIONS
|
static String |
PASSWORD
|
static String |
SPYATTRIBUTES
|
static String |
USER
|
| Constructor Summary | |
DDXQDataSource()
Creates new DDXQDataSource, merely used for Externalizability. |
|
DDXQDataSource(InputStream configuration)
Creates new DDXQDataSource using the supplied configuration file. |
|
DDXQDataSource(String valuePairs)
Creates new DDXQDataSource using the supplied key value pair with all the datasource options. |
|
| Method Summary | |
String |
getBaseUri()
Get the default BaseUri. |
String |
getCollation()
Get the default Collation. |
String |
getCollectionUriResolver()
Gets the default CollectionUriResolver. |
XQConnection |
getConnection()
XQuery standard methods * |
XQConnection |
getConnection(Connection con)
Attempts to create a connection to an XML datasource using an existing JDBC connection. |
XQConnection |
getConnection(String username,
String passwd)
Attempts to establish a connection to an XML datasource using the supplied username and password. |
DDXQJDBCConnection[] |
getDdxqJdbcConnection()
|
DDXQJDBCConnection |
getDdxqJdbcConnection(int position)
Returns the DDXQJDBCConnection at the specified position. |
String |
getDocumentUriResolver()
Get the default DocumentUriResolver. |
int |
getJdbcAdapters()
Get the number of adapters defined in this datasource |
String |
getJdbcName()
Get the JdbcName of the first SQL Adapter. |
String |
getJdbcOptions()
Get the JdbcOption for the first SQL Adapter. |
boolean |
getJdbcSqlXmlForest()
Gets the forest property specifies the format of the XML result that fn:collection() returns of the first SQL Adapter. |
String |
getJdbcSqlXmlIdentifierEscaping()
Gets the property controls how DataDirect XQuery handles escaping of identifiers, which is needed because of mismatches that occur when characters in SQL identifiers are mapped to XML of the first SQL Adapter. |
String |
getJdbcTempTableColumns()
Gets the string representation of the temp table column-type pairs, or null if not set of the first SQL addapter. |
String |
getJdbcTempTableSuffix()
Gets the prefix used for temp tables of the first SQL adapter. |
int |
getJdbcTransactionIsolationLevel()
Gets the transaction isolation level, one of the following values: |
String |
getJdbcUrl()
Get the JdbcUrl for connecting to the first SQL Adapter. |
int |
getLoginTimeout()
Gets the maximum time in seconds that this datasource can wait while attempting to connect to a database. |
PrintWriter |
getLogWriter()
Retrieves the log writer for this XQDataSource object.
|
int |
getMaxPooledQueries()
|
String |
getModuleUriResolver()
Get the default ModuleUriResolver. |
String |
getOptions()
Get the options. |
String |
getPassword()
Get the password. |
String |
getProperty(String name)
Returns the current value of the named property if set, else null. |
Reference |
getReference()
|
String |
getSpyAttributes()
|
String[] |
getSupportedPropertyNames()
Returns an array containing the property names supported by this XQDataSource.
|
String |
getUser()
Get the user name. |
boolean |
isAllowJavaFunctions()
|
void |
readExternal(ObjectInput in)
|
void |
setAllowJavaFunctions(boolean allowJavaFunctions)
|
void |
setBaseUri(String baseUri)
Set the default BaseUri. |
void |
setCollation(String collation)
Set the default Collation. |
void |
setCollectionUriResolver(String collectionUriResolver)
Sets the default CollectionUriResolver. |
void |
setCommonHandler(XQCommonHandler hdlr)
Sets the default common handler to be used for converting items to and from Java objects in the getObject methods on an item.
|
void |
setDdxqJdbcConnection(DDXQJDBCConnection[] ddxqJdbcConnection)
|
void |
setDdxqJdbcConnection(int position,
DDXQJDBCConnection ddxqJdbcConnection)
Sets the DDXQJdbcConnection at the specified position. |
void |
setDocumentUriResolver(String documentUriResolver)
Set the default DocumentURIResolver. |
void |
setJdbcName(String jdbcName)
Set the Jdbcname for the first SQL Adapter. |
void |
setJdbcOptions(String jdbcOption)
Set the JdbcOptions string for the first SQL Adapter. |
void |
setJdbcSqlXmlForest(boolean forest)
Sets the forest property specifies the format of the XML result that fn:collection() returns of the first SQL Adapter. |
void |
setJdbcSqlXmlIdentifierEscaping(String mapping)
Sets the property controls how DataDirect XQuery handles escaping of identifiers, which is needed because of mismatches that occur when characters in SQL identifiers are mapped to XML of the first SQL Adapter. |
void |
setJdbcTempTableColumns(String jdbcOption)
Set the string representation of the temp table column-type pairs of the first SQL adapter. |
void |
setJdbcTempTableSuffix(String jdbcOption)
Set the prefix used for temp tables of the first SQL adapter. |
void |
setJdbcTransactionIsolationLevel(int level)
Sets the transaction isolation level, one of the following values: java.sql.Connection.TRANSACTION_READ_UNCOMMITTED java.sql.Connection.TRANSACTION_READ_COMMITTED java.sql.Connection.TRANSACTION_REPEATABLE_READ java.sql.Connection.TRANSACTION_SERIALIZABLE |
void |
setJdbcUrl(String jdbcUrl)
Set the JdbcUrl for the first SQL Adapter. |
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this datasource will wait while attempting to connect to a database. |
void |
setLogWriter(PrintWriter out)
Sets the log writer for this XQDataSource object to the given
java.io.PrintWriter object. |
void |
setMaxPooledQueries(int maxPooledQueries)
|
void |
setModuleUriResolver(String moduleUriResolver)
Set the default ModuleURIResolver. |
void |
setOptions(String options)
Set the options |
void |
setPassword(String password)
Set the password. |
void |
setProperties(Properties props)
Sets the data source properties from the specified Properties
instance. |
void |
setProperty(String name,
String value)
Sets the named property to the specified value. |
void |
setSpyAttributes(String spyAttributes)
|
void |
setUser(String user)
Set the user name. |
void |
writeConfiguration(OutputStream os)
Saves this DDXQDataSource to an outputStream which can later be used with the constructor. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String BASEURI
public static final String JDBCURL
public static final String JDBCNAME
public static final String JDBCOPTIONS
public static final String COLLATION
public static final String OPTIONS
public static final String SPYATTRIBUTES
public static final String DOCUMENTURIRESOLVER
public static final String MODULEURIRESOLVER
public static final String COLLECTIONURIRESOLVER
public static final String MAXPOOLEDQUERIES
public static final String ALLOWJAVAFUNCTIONS
public static final String USER
public static final String PASSWORD
public static final String JDBCSQLXMLFOREST
public static final String JDBCSQLXMLIDENTIER
public static final String JDBCISOLATIONLEVEL
public static final String JDBCTEMPTABLESUFFIX
public static final String JDBCTEMPTABLECOLUMNS
public static final String MULTIVALUE_ADAPTERS
| Constructor Detail |
public DDXQDataSource()
public DDXQDataSource(InputStream configuration)
throws XQException
XQueryException
XQException
public DDXQDataSource(String valuePairs)
throws XQException
XQueryException
XQException| Method Detail |
public void setBaseUri(String baseUri)
baseUri - the default BaseUri or null if nonepublic String getBaseUri()
null to clear.public int getJdbcAdapters()
public void setJdbcUrl(String jdbcUrl)
jdbcUrl - the JdbcUrl for connecting to the first SQL Adapter or
null if nonepublic String getJdbcUrl()
null if not set.public void setJdbcName(String jdbcName)
jdbcName - the JdbcName for connecting to the first SQL Adapter or
null if nonepublic String getJdbcName()
public void setJdbcOptions(String jdbcOption)
throws XQException
jdbcOption - the JdbcOption for the first SQL Adapter or null if none
XQExceptionpublic String getJdbcOptions()
null if not set.
public void setJdbcTempTableSuffix(String jdbcOption)
throws XQException
XQExceptionpublic String getJdbcTempTableSuffix()
public void setJdbcTempTableColumns(String jdbcOption)
throws XQException
XQExceptionpublic String getJdbcTempTableColumns()
null if not set of the first SQL addapter.
XQExceptionpublic void setCollation(String collation)
collation - the name of the default Collation.public String getCollation()
public void setOptions(String options)
throws XQException
XQException - when the option value has the wrong format.public String getOptions()
null if not setpublic void setUser(String user)
user - the name of the user used to connect to all SQL adapters.public String getUser()
public void setPassword(String password)
password - the password used to connect to all SQL adapters.public String getPassword()
public void setDocumentUriResolver(String documentUriResolver)
public String getDocumentUriResolver()
null if not setpublic void setModuleUriResolver(String moduleUriResolver)
public String getModuleUriResolver()
null if not setpublic boolean isAllowJavaFunctions()
public void setAllowJavaFunctions(boolean allowJavaFunctions)
allowJavaFunctions - the allowJavaFunctions to set.public int getMaxPooledQueries()
public void setMaxPooledQueries(int maxPooledQueries)
maxPooledQueries - the maxPooledQueries to set.public String getSpyAttributes()
public void setSpyAttributes(String spyAttributes)
spyAttributes - the spyAttributes to set.public void setDdxqJdbcConnection(DDXQJDBCConnection[] ddxqJdbcConnection)
ddxqJdbcConnection - the Array of DDXQJdbcConnections
public void setDdxqJdbcConnection(int position,
DDXQJDBCConnection ddxqJdbcConnection)
position - the position to store the DDXQJDBCConnection atddxqJdbcConnection - the DDXQJDBCConnection to be stored at the specified position
IndexOutOfBoundsException - if position is out of rangepublic DDXQJDBCConnection[] getDdxqJdbcConnection()
public DDXQJDBCConnection getDdxqJdbcConnection(int position)
position - the position of the DDXQJDBCConnection to return.
IndexOutOfBoundsException - when the position is out of range.public String getCollectionUriResolver()
null if not setpublic void setCollectionUriResolver(String collectionUriResolver)
collectionUriResolver - the default CollectionUriResolver or null if nonepublic void setJdbcSqlXmlForest(boolean forest)
public boolean getJdbcSqlXmlForest()
public void setJdbcSqlXmlIdentifierEscaping(String mapping)
none: No mapping is performed. An error is raised if a character in a
SQL identifier cannot be mapped to XML.
partial: Characters in SQL identifiers, except for colons ( : ), that are not
XML characters are escaped using 'x'0 followed by the character�s Unicode
representation in hexadecimal format.
For example, "comp_plan" becomes comp_x005F_plan and "dept:id" becomes
dept:id.
full: All non-XML characters, including colons ( : ), are escaped in the
SQL identifier name. For example, "dept:id" becomes dept_x003A_id. This setting
also escapes names beginning with the characters "xml"
The default mapping is full.
mapping - of how escaping of identifiers is handled.public String getJdbcSqlXmlIdentifierEscaping()
public void setJdbcTransactionIsolationLevel(int level)
level - the transaction isolation level.public int getJdbcTransactionIsolationLevel()
public XQConnection getConnection()
throws XQException
getConnection in interface XQDataSourceXQException - if a datasource access error occurs
public XQConnection getConnection(Connection con)
throws XQException
XQDataSourceXQException)
is thrown. The XQJ and JDBC connections will operate under the same
transaction context.
getConnection in interface XQDataSourcecon - an existing JDBC connection
XQException - if (1) a datasource access error occurs,
or (2) the implementation does not support
this method of getting an
XQConnection
public XQConnection getConnection(String username,
String passwd)
throws XQException
XQDataSource
getConnection in interface XQDataSourceusername - the user on whose behalf the connection
is being madepasswd - the user's password
XQException - if a datasource access error occurs
public int getLoginTimeout()
throws XQException
XQDataSource
getLoginTimeout in interface XQDataSourceXQException - if a datasource access error occurs
public PrintWriter getLogWriter()
throws XQException
XQDataSourceXQDataSource object.
The log writer is a character output stream to which all logging and
tracing messages for this datasource will be printed. This includes
messages printed by the methods of this object, messages printed by
methods of other objects manufactured by this object, and so on.
When a XQDataSource object is created, the log writer is
initially null; in other words, the default is for logging
to be disabled.
getLogWriter in interface XQDataSourcenull if logging is disabled
XQException - if a datasource access error occurspublic String[] getSupportedPropertyNames()
XQDataSourceXQDataSource.
Implementations that support user name and password must recognize
the user name and password properties listed below.
user |
the user name to use for creating a connection |
password |
the password to use for creating a connection |
getSupportedPropertyNames in interface XQDataSourceString[] an array of property names
supported by this implementation
public void setProperty(String name,
String value)
throws XQException
XQDataSourceIf the implementation does not support the given property or if it can determine that the value given for this property is invalid, then an exception is thrown. If an exception is thrown, then no previous value is overwritten.
setProperty in interface XQDataSourcename - the name of the property to setvalue - the value of the named property
XQException - if (1) the given property is not recognized,
or (2) the value for the given property is
determined to be invalid
public String getProperty(String name)
throws XQException
XQDataSourcenull. If the implementation does not support the
given property then an exception is raised.
getProperty in interface XQDataSourcename - the name of the property whose value is
needed
String representing the value of
the required property if set, else
null
XQException - if a given property is not supported
public void setProperties(Properties props)
throws XQException
XQDataSourceProperties
instance. Properties set before this call will still apply but
those with the same name as any of these properties will be replaced.
Properties set after this call also apply and may
replace properties set during this call.If the implementation does not support one or more of the given property names, or if it can determine that the value given for a specific property is invalid, then an exception is thrown. If an exception is thrown, then no previous value is overwritten. is invalid, then an exception is raised.
setProperties in interface XQDataSourceprops - the list of properties to set
XQException - if (1) a given property is not recognized,
or (2) the value for a given property is
determined to be invalid
public void setCommonHandler(XQCommonHandler hdlr)
throws XQException
XQDataSourcegetObject methods on an item.
An XQJ implementation is not required to support this method. If it
is not supported, then an exception (XQException) is thrown.
setCommonHandler in interface XQDataSourcehdlr - the XQCommonHandler to use
XQException - if this method is not supported by the
implementationXQItemAccessor.getObject
public void setLoginTimeout(int seconds)
throws XQException
XQDataSourceXQDataSource
object is created, the login timeout is initially zero.
It is implementation-defined whether the specified login timeout is
actually used by the data source implementation. If the connection is
created over an existing JDBC connection, then the login timeout
value from the underlying JDBC connection may be used.
setLoginTimeout in interface XQDataSourceseconds - the datasource login time limit
XQException - if a datasource access error occurs
public void setLogWriter(PrintWriter out)
throws XQException
XQDataSourceXQDataSource object to the given
java.io.PrintWriter object. The log writer is a character output
stream to which all logging and tracing messages for this datasource
will be printed. This includes messages printed by the methods of this
object, messages printed by methods of other objects manufactured by
this object, and so on. When a XQDataSource object is created
the log writer is initially null; in other words, the default
is for logging to be disabled.
setLogWriter in interface XQDataSourceout - the new log writer; to disable logging, set to
null
XQException - if a datasource access error occurs
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public Reference getReference()
throws NamingException
getReference in interface ReferenceableNamingException
public void writeConfiguration(OutputStream os)
throws IOException
os - The OutputStream to save this Configuration to.
IOException - When something went wrong saving the configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||