An ZorbaXQDataSource is a factory for ZorbaXQConnection objects.
More...
Inherits XQDataSource.
An ZorbaXQDataSource is a factory for ZorbaXQConnection objects.
Definition at line 27 of file ZorbaXQDataSource.java.
org.zorbaxquery.api.xqj.ZorbaXQDataSource.ZorbaXQDataSource |
( |
| ) |
|
|
inline |
ZorbaXQConnection org.zorbaxquery.api.xqj.ZorbaXQDataSource.getConnection |
( |
| ) |
throws XQException |
|
inline |
Attempts to create a connection to an XML datasource.
- Returns
- a connection to the XML datasource
- Exceptions
-
XQException | - if a datasource access error occurs |
Definition at line 50 of file ZorbaXQDataSource.java.
ZorbaXQConnection org.zorbaxquery.api.xqj.ZorbaXQDataSource.getConnection |
( |
Connection |
cnctn | ) |
throws XQException |
|
inline |
Attempts to create a connection to an XML datasource using an existing JDBC connection.
An XQJ implementation is not required to support this method. If it is not supported, then an exception (XQException) is thrown. The XQJ and JDBC connections will operate under the same transaction context.
- Parameters
-
cnctn | - an existing JDBC connection |
- Returns
- a connection to the XML datasource
- Exceptions
-
XQException | - if (1) a datasource access error occurs, (2) the implementation does not support this method of getting an ZorbaXQConnection, or (3) if the con parameter is null |
Definition at line 73 of file ZorbaXQDataSource.java.
ZorbaXQConnection org.zorbaxquery.api.xqj.ZorbaXQDataSource.getConnection |
( |
String |
username, |
|
|
String |
passwd |
|
) |
| throws XQException |
|
inline |
Attempts to establish a connection to an XML datasource using the supplied username and password.
- Parameters
-
username | - the user on whose behalf the connection is being made |
passwd | - the user's password |
- Returns
- a connection to the XML datasource
- Exceptions
-
XQException | - if a datasource access error occurs |
Definition at line 91 of file ZorbaXQDataSource.java.
int org.zorbaxquery.api.xqj.ZorbaXQDataSource.getLoginTimeout |
( |
| ) |
throws XQException |
|
inline |
Gets the maximum time in seconds that this datasource can wait while attempting to connect to a database.
A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout. When a ZorbaXQDataSource object is created, the login timeout is initially zero. It is implementation-defined whether the returned login timeout is actually used by the data source implementation.
- Returns
- the datasource login time limit
- Exceptions
-
XQException | - if a datasource access error occurs |
Definition at line 113 of file ZorbaXQDataSource.java.
PrintWriter org.zorbaxquery.api.xqj.ZorbaXQDataSource.getLogWriter |
( |
| ) |
throws XQException |
|
inline |
Retrieves the log writer for this ZorbaXQDataSource 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 ZorbaXQDataSource object is created, the log writer is initially null; in other words, the default is for logging to be disabled.
- Returns
- the log writer for this datasource or null if logging is disabled
- Exceptions
-
XQException | - if a datasource access error occurs |
Definition at line 125 of file ZorbaXQDataSource.java.
References org.zorbaxquery.api.xqj.ZorbaXQDataSource.logWriter.
String org.zorbaxquery.api.xqj.ZorbaXQDataSource.getProperty |
( |
String |
name | ) |
throws XQException |
|
inline |
Returns the current value of the named property if set, else null.
If the implementation does not support the given property then an exception is raised.
- Parameters
-
name | - the name of the property whose value is needed |
- Returns
- String representing the value of the required property if set, else null
- Exceptions
-
XQException | - if (1) a given property is not supported, or (2) the name parameter is null |
Definition at line 181 of file ZorbaXQDataSource.java.
String [] org.zorbaxquery.api.xqj.ZorbaXQDataSource.getSupportedPropertyNames |
( |
| ) |
|
|
inline |
Returns an array containing the property names supported by this ZorbaXQDataSource.
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
Any additional properties are implementation-defined.
- Returns
- String[] an array of property names supported by this implementation
Definition at line 141 of file ZorbaXQDataSource.java.
void org.zorbaxquery.api.xqj.ZorbaXQDataSource.setLoginTimeout |
( |
int |
seconds | ) |
throws XQException |
|
inline |
Sets the maximum time in seconds that this datasource will wait while attempting to connect to a database.
A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a ZorbaXQDataSource 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.
- Parameters
-
seconds | - the datasource login time limit |
- Exceptions
-
XQException | - if a datasource access error occurs |
Definition at line 242 of file ZorbaXQDataSource.java.
void org.zorbaxquery.api.xqj.ZorbaXQDataSource.setLogWriter |
( |
PrintWriter |
writer | ) |
throws XQException |
|
inline |
Sets the log writer for this ZorbaXQDataSource 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 ZorbaXQDataSource object is created the log writer is initially null; in other words, the default is for logging to be disabled.
- Parameters
-
writer | - the new log writer; to disable logging, set to null |
- Exceptions
-
XQException | - if a datasource access error occurs |
Definition at line 254 of file ZorbaXQDataSource.java.
References org.zorbaxquery.api.xqj.ZorbaXQDataSource.logWriter.
void org.zorbaxquery.api.xqj.ZorbaXQDataSource.setProperties |
( |
Properties |
prprts | ) |
throws XQException |
|
inline |
Sets the data source properties from the specified Properties 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.
- Parameters
-
prprts | - the list of properties to set |
- Exceptions
-
XQException | - if (1) a given property is not recognized, (2) the value for a given property is determined to be invalid, or (3) the props parameter is null |
Definition at line 206 of file ZorbaXQDataSource.java.
void org.zorbaxquery.api.xqj.ZorbaXQDataSource.setProperty |
( |
String |
name, |
|
|
String |
value |
|
) |
| throws XQException |
|
inline |
Sets the named property to the specified value.
If a property with the same name was already set, then this method will override the old value for that property with the new value. If 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.
- Parameters
-
name | - the name of the property to set |
value | - the value of the named property |
- Exceptions
-
XQException | - if (1) the given property is not recognized, (2) the value for the given property is determined to be invalid, or (3) the name parameter is null |
Definition at line 155 of file ZorbaXQDataSource.java.
PrintWriter org.zorbaxquery.api.xqj.ZorbaXQDataSource.logWriter |
|
protected |
final String org.zorbaxquery.api.xqj.ZorbaXQDataSource.ZORBA_PROPERTIES_LIB_PATHS = "LIB-PATHS" |
|
static |
final String org.zorbaxquery.api.xqj.ZorbaXQDataSource.ZORBA_PROPERTIES_MODULE_PATHS = "MODULE-PATHS" |
|
static |
final String org.zorbaxquery.api.xqj.ZorbaXQDataSource.ZORBA_PROPERTIES_URI_PATHS = "URI-PATHS" |
|
static |
The documentation for this class was generated from the following file: